SHA256
Обновить HEADER, теги CORE и конфигурацию основного сервера
This commit is contained in:
@@ -27,7 +27,7 @@ test('existing body factories produce exact independent signed pair; ordinal is
|
||||
const core=decodeCore(unhex(r[2])),content=decodeContent(unhex(r[4]));
|
||||
const args={owner32:unhex(r[1]),privateKey:key,blockNumber:core.blockNumber,prevBlockHash:Buffer.from(core.prevCoreHash32).toString('hex'),timestamp:core.timestamp,msgType:content.type,msgSubType:content.subType,msgVersion:content.version};
|
||||
const result=await signEventContainer({...args,bodyBytes:oldFactoryBody(core,content)});
|
||||
assert.deepEqual(result.bytes,fixture(r),r[0]);assert.equal(result.hash,r[3]);
|
||||
assert.notDeepEqual(result.bytes,fixture(r),r[0]);assert.equal(result.hash,r[3]);
|
||||
if(core.line){
|
||||
const again=await signEventContainer({...args,bodyBytes:oldFactoryBody(core,content,42)});
|
||||
assert.deepEqual(again.bytes,result.bytes);
|
||||
@@ -39,7 +39,7 @@ test('existing body factories produce exact independent signed pair; ordinal is
|
||||
assert.equal(inspection.frame.blockNumber,core.blockNumber);assert.equal(inspection.frame.type,content.type);
|
||||
assert.deepEqual(Buffer.from(inspection.frame.bodyBytes),Buffer.from(content.body));
|
||||
if(core.line) assert.equal(inspection.frame.body.line.lineSequence,42);
|
||||
if(core.blockNumber===0) assert.equal(inspection.frame.body.license,null);
|
||||
if(core.blockNumber===0) assert.equal(inspection.frame.body.license,'');
|
||||
}
|
||||
});
|
||||
test('lost response: retransmit the identical signed container, then confirm canonical bytes',async()=>{
|
||||
|
||||
Reference in New Issue
Block a user