SHA256
Исправить подпись user PDA формата 1.0
This commit is contained in:
@@ -31,7 +31,7 @@ full.set(bytes(64, 200), unsigned.length);
|
||||
const parsed = parseShineUserPda(full);
|
||||
|
||||
assert.equal(parsed.formatMajor, 1);
|
||||
assert.equal(parsed.formatMinor, 3);
|
||||
assert.equal(parsed.formatMinor, 0);
|
||||
assert.equal(parsed.isLegacy, false);
|
||||
assert.equal(parsed.recordNumber, 4);
|
||||
assert.equal(parsed.forks.length, 2);
|
||||
@@ -48,4 +48,4 @@ assert.notDeepEqual(unsigned, alternate, 'stored bytes must preserve actual quot
|
||||
assert.deepEqual(canonicalPdaSigningBytes(unsigned), canonicalPdaSigningBytes(alternate),
|
||||
'changing only a system-owned limit must not affect root signature hash');
|
||||
assert.equal(canonicalPdaSigningBytes(unsigned).length, unsigned.length - state.forks.length * 4);
|
||||
console.log(`PDA 1.3 codec/canonical hash smoke test OK (${full.length} bytes)`);
|
||||
console.log(`PDA 1.0 codec/canonical hash smoke test OK (${full.length} bytes)`);
|
||||
|
||||
Reference in New Issue
Block a user