aboutsummaryrefslogtreecommitdiffstats
path: root/core/database_util_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-08-24 21:17:02 +0800
committerFelix Lange <fjl@twurst.com>2017-08-25 05:51:50 +0800
commitad16aeb0a2e79ef6e9db30667152d73565715391 (patch)
treedda210a8733ab7bbc9d11ab26f57879cd0f00eff /core/database_util_test.go
parent68955ed2eb12165416411dc30b1ac4d74aa49307 (diff)
downloaddexon-ad16aeb0a2e79ef6e9db30667152d73565715391.tar
dexon-ad16aeb0a2e79ef6e9db30667152d73565715391.tar.gz
dexon-ad16aeb0a2e79ef6e9db30667152d73565715391.tar.bz2
dexon-ad16aeb0a2e79ef6e9db30667152d73565715391.tar.lz
dexon-ad16aeb0a2e79ef6e9db30667152d73565715391.tar.xz
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.go4
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})},