[]byte{} val for removed storage nodes to make pgx vs sqlx results more consistent

This commit is contained in:
i-norden 2023-03-21 11:57:15 -05:00
parent 25839ddd54
commit 02bcb1add6
2 changed files with 14 additions and 0 deletions

View File

@ -499,6 +499,7 @@ func (sdb *StateDiffBuilder) buildRemovedStorageNodesFromTrie(it trie.NodeIterat
CID: shared.RemovedNodeStorageCID,
Removed: true,
LeafKey: leafKey,
Value: []byte{},
}); err != nil {
return err
}
@ -580,6 +581,7 @@ func (sdb *StateDiffBuilder) deletedOrUpdatedStorage(a, b trie.NodeIterator, dif
CID: shared.RemovedNodeStorageCID,
Removed: true,
LeafKey: leafKey,
Value: []byte{},
}); err != nil {
return err
}

View File

@ -1216,11 +1216,13 @@ func TestBuilderWithRemovedAccountAndStorage(t *testing.T) {
Removed: true,
LeafKey: slot1StorageKey.Bytes(),
CID: shared.RemovedNodeStorageCID,
Value: []byte{},
},
{
Removed: true,
LeafKey: slot3StorageKey.Bytes(),
CID: shared.RemovedNodeStorageCID,
Value: []byte{},
},
},
},
@ -1310,6 +1312,7 @@ func TestBuilderWithRemovedAccountAndStorage(t *testing.T) {
Removed: true,
LeafKey: slot2StorageKey.Bytes(),
CID: shared.RemovedNodeStorageCID,
Value: []byte{},
},
},
},
@ -1381,11 +1384,13 @@ func TestBuilderWithRemovedAccountAndStorage(t *testing.T) {
Removed: true,
LeafKey: slot0StorageKey.Bytes(),
CID: shared.RemovedNodeStorageCID,
Value: []byte{},
},
{
Removed: true,
LeafKey: slot3StorageKey.Bytes(),
CID: shared.RemovedNodeStorageCID,
Value: []byte{},
},
},
},
@ -1678,11 +1683,13 @@ func TestBuilderWithRemovedWatchedAccount(t *testing.T) {
Removed: true,
LeafKey: slot1StorageKey.Bytes(),
CID: shared.RemovedNodeStorageCID,
Value: []byte{},
},
{
Removed: true,
LeafKey: slot3StorageKey.Bytes(),
CID: shared.RemovedNodeStorageCID,
Value: []byte{},
},
},
},
@ -1740,6 +1747,7 @@ func TestBuilderWithRemovedWatchedAccount(t *testing.T) {
Removed: true,
LeafKey: slot2StorageKey.Bytes(),
CID: shared.RemovedNodeStorageCID,
Value: []byte{},
},
},
},
@ -1807,11 +1815,13 @@ func TestBuilderWithRemovedWatchedAccount(t *testing.T) {
Removed: true,
LeafKey: slot0StorageKey.Bytes(),
CID: shared.RemovedNodeStorageCID,
Value: []byte{},
},
{
Removed: true,
LeafKey: slot3StorageKey.Bytes(),
CID: shared.RemovedNodeStorageCID,
Value: []byte{},
},
},
},
@ -2086,11 +2096,13 @@ func TestBuilderWithMovedAccount(t *testing.T) {
Removed: true,
LeafKey: slot0StorageKey.Bytes(),
CID: shared.RemovedNodeStorageCID,
Value: []byte{},
},
{
Removed: true,
LeafKey: slot1StorageKey.Bytes(),
CID: shared.RemovedNodeStorageCID,
Value: []byte{},
},
},
},