SHA256
CORE/CONTENT test5593 и адаптация UI
This commit is contained in:
@@ -27,12 +27,11 @@ test('подмена payload не проходит проверку подпис
|
||||
assert.equal(proof.signatureValid, false);
|
||||
assert.notEqual(Buffer.from(proof.frameHashBytes).toString('hex'), expectedHash);
|
||||
});
|
||||
test('по API нельзя скачать DataItem с подменённым хешем или ID', async () => {
|
||||
test('активный CORE API не принимает старый Frame как пару', async () => {
|
||||
const bytes = new Uint8Array(await readFile(signedPath));
|
||||
const authService = { ws: { request: async () => ({ status: 200, payload: {
|
||||
blockHash: expectedHash, blockBytesB64: Buffer.from(bytes).toString('base64'),
|
||||
} }) } };
|
||||
assert.equal((await readSignedBlock({authService, blockchainName:'wwwww@shine-001',blockNumber:11,blockHash:expectedHash,dataItemId:expectedId})).bytes.length, 412);
|
||||
await assert.rejects(readSignedBlock({authService, blockchainName:'wwwww@shine-001',blockNumber:11,blockHash:expectedHash,dataItemId:'A'.repeat(43)}), /Arweave/);
|
||||
await assert.rejects(readSignedBlock({authService, blockchainName:'wwwww@shine-001',blockNumber:11,blockHash:expectedHash,dataItemId:expectedId}));
|
||||
assert.equal(arweaveBlockUrl('../evil'), '');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user