forked from TrueCloudLab/neoneo-go
Merge pull request #2446 from nspcc-dev/fix-stateroot
core: fix broken stateroot storage
This commit is contained in:
commit
f65c638be4
3 changed files with 3 additions and 3 deletions
|
@ -46,7 +46,7 @@ import (
|
|||
// Tuning parameters.
|
||||
const (
|
||||
headerBatchCount = 2000
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
|
||||
defaultInitialGAS = 52000000_00000000
|
||||
defaultGCPeriod = 10000
|
||||
|
|
|
@ -277,7 +277,7 @@ func TestBlockchain_StartFromExistingDB(t *testing.T) {
|
|||
cache := storage.NewMemCachedStore(ps) // Extra wrapper to avoid good DB corruption.
|
||||
key := make([]byte, 5)
|
||||
key[0] = byte(storage.DataMPTAux)
|
||||
binary.BigEndian.PutUint32(key, h)
|
||||
binary.BigEndian.PutUint32(key[1:], h)
|
||||
cache.Delete(key)
|
||||
|
||||
_, _, _, err := chain.NewMultiWithCustomConfigAndStoreNoCheck(t, customConfig, cache)
|
||||
|
|
|
@ -51,7 +51,7 @@ func (s *Module) getStateRoot(key []byte) (*state.MPTRoot, error) {
|
|||
func makeStateRootKey(index uint32) []byte {
|
||||
key := make([]byte, 5)
|
||||
key[0] = byte(storage.DataMPTAux)
|
||||
binary.BigEndian.PutUint32(key, index)
|
||||
binary.BigEndian.PutUint32(key[1:], index)
|
||||
return key
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue