diff options
author | Felix Lange <fjl@twurst.com> | 2017-08-24 21:17:02 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2017-08-25 05:51:50 +0800 |
commit | ad16aeb0a2e79ef6e9db30667152d73565715391 (patch) | |
tree | dda210a8733ab7bbc9d11ab26f57879cd0f00eff /core/database_util_test.go | |
parent | 68955ed2eb12165416411dc30b1ac4d74aa49307 (diff) | |
download | dexon-ad16aeb0a2e79ef6e9db30667152d73565715391.tar.gz dexon-ad16aeb0a2e79ef6e9db30667152d73565715391.tar.zst dexon-ad16aeb0a2e79ef6e9db30667152d73565715391.zip |
core/types: encode receipt status in PostState field
This fixes a regression where the new Failed field in ReceiptForStorage
rejected previously stored receipts. Fix it by removing the new field
and store status in the PostState field. This also removes massive RLP
hackery around the status field.
Diffstat (limited to 'core/database_util_test.go')
-rw-r--r-- | core/database_util_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/database_util_test.go b/core/database_util_test.go index 5c75d53d0..e91f1b593 100644 --- a/core/database_util_test.go +++ b/core/database_util_test.go @@ -340,7 +340,7 @@ func TestBlockReceiptStorage(t *testing.T) { db, _ := ethdb.NewMemDatabase() receipt1 := &types.Receipt{ - PostState: []byte{0x01}, + Failed: true, CumulativeGasUsed: big.NewInt(1), Logs: []*types.Log{ {Address: common.BytesToAddress([]byte{0x11})}, @@ -351,7 +351,7 @@ func TestBlockReceiptStorage(t *testing.T) { GasUsed: big.NewInt(111111), } receipt2 := &types.Receipt{ - PostState: []byte{0x02}, + PostState: common.Hash{2}.Bytes(), CumulativeGasUsed: big.NewInt(2), Logs: []*types.Log{ {Address: common.BytesToAddress([]byte{0x22})}, |