-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Description
test code:
it('check_tx_id', async function () {
// test 147056 / 00000000000007a678f2e1316e0f7f7acf2b967d998558aed8dadcd4430fd5f1
const height = 147056
const blockhash = await chain.getblockhash(height)
const chain_block_hex = await chain.getblock(blockhash, 0)
const chain_block = await chain.getblock(blockhash, 1)
const chain_tx0_id = chain_block.tx[0]
const block = bsv.Block.fromBuffer(Buffer.from(chain_block_hex, 'hex'))
const block_tx0_id = block.txs[0].id()
console.log(chain_tx0_id)
console.log(block_tx0_id)
expect(chain_tx0_id).to.equal(block_tx0_id);
});
The two tx ids should be equal. Obviously block_tx0_id is not correct.
2) bsv
check_tx_id:
AssertionError: expected '9fa47592276963ff2b8d44d0f547b03a41ac1e4e18e2a02b5445ade9b021071d' to equal '121f0f093c0e98bb499643bbe781a9746deaf4b9b123f958b2a962b3bb57d873'
+ expected - actual
-9fa47592276963ff2b8d44d0f547b03a41ac1e4e18e2a02b5445ade9b021071d
+121f0f093c0e98bb499643bbe781a9746deaf4b9b123f958b2a962b3bb57d873
at Context.<anonymous> (test/chain.spec.js:59:29)
at process._tickCallback (internal/process/next_tick.js:68:7)
mathiasrw and calvogenerico
Metadata
Metadata
Assignees
Labels
No labels
