fix tests in core/types

This commit is contained in:
Sina Mahmoodi 2025-05-23 17:44:51 +02:00
parent 61222d89cc
commit aa70aaba37

View file

@ -173,21 +173,23 @@ func getTestReceipts() Receipts {
Address: common.BytesToAddress([]byte{0x11}), Address: common.BytesToAddress([]byte{0x11}),
Topics: []common.Hash{common.HexToHash("dead"), common.HexToHash("beef")}, Topics: []common.Hash{common.HexToHash("dead"), common.HexToHash("beef")},
// derived fields: // derived fields:
BlockNumber: blockNumber.Uint64(), BlockNumber: blockNumber.Uint64(),
TxHash: txs[0].Hash(), TxHash: txs[0].Hash(),
TxIndex: 0, TxIndex: 0,
BlockHash: blockHash, BlockHash: blockHash,
Index: 0, BlockTimestamp: blockTime,
Index: 0,
}, },
{ {
Address: common.BytesToAddress([]byte{0x01, 0x11}), Address: common.BytesToAddress([]byte{0x01, 0x11}),
Topics: []common.Hash{common.HexToHash("dead"), common.HexToHash("beef")}, Topics: []common.Hash{common.HexToHash("dead"), common.HexToHash("beef")},
// derived fields: // derived fields:
BlockNumber: blockNumber.Uint64(), BlockNumber: blockNumber.Uint64(),
TxHash: txs[0].Hash(), TxHash: txs[0].Hash(),
TxIndex: 0, TxIndex: 0,
BlockHash: blockHash, BlockHash: blockHash,
Index: 1, BlockTimestamp: blockTime,
Index: 1,
}, },
}, },
// derived fields: // derived fields:
@ -207,21 +209,23 @@ func getTestReceipts() Receipts {
Address: common.BytesToAddress([]byte{0x22}), Address: common.BytesToAddress([]byte{0x22}),
Topics: []common.Hash{common.HexToHash("dead"), common.HexToHash("beef")}, Topics: []common.Hash{common.HexToHash("dead"), common.HexToHash("beef")},
// derived fields: // derived fields:
BlockNumber: blockNumber.Uint64(), BlockNumber: blockNumber.Uint64(),
TxHash: txs[1].Hash(), TxHash: txs[1].Hash(),
TxIndex: 1, TxIndex: 1,
BlockHash: blockHash, BlockHash: blockHash,
Index: 2, BlockTimestamp: blockTime,
Index: 2,
}, },
{ {
Address: common.BytesToAddress([]byte{0x02, 0x22}), Address: common.BytesToAddress([]byte{0x02, 0x22}),
Topics: []common.Hash{common.HexToHash("dead"), common.HexToHash("beef")}, Topics: []common.Hash{common.HexToHash("dead"), common.HexToHash("beef")},
// derived fields: // derived fields:
BlockNumber: blockNumber.Uint64(), BlockNumber: blockNumber.Uint64(),
TxHash: txs[1].Hash(), TxHash: txs[1].Hash(),
TxIndex: 1, TxIndex: 1,
BlockHash: blockHash, BlockHash: blockHash,
Index: 3, BlockTimestamp: blockTime,
Index: 3,
}, },
}, },
// derived fields: // derived fields: