mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
triedb/pathdb: persist rawStorageKey as part of stateSet
This commit is contained in:
parent
d6c8fc427c
commit
f458ddef40
1 changed files with 6 additions and 0 deletions
|
|
@ -333,6 +333,9 @@ func (s *stateSet) updateSize(delta int) {
|
||||||
// encode serializes the content of state set into the provided writer.
|
// encode serializes the content of state set into the provided writer.
|
||||||
func (s *stateSet) encode(w io.Writer) error {
|
func (s *stateSet) encode(w io.Writer) error {
|
||||||
// Encode accounts
|
// Encode accounts
|
||||||
|
if err := rlp.Encode(w, s.rawStorageKey); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
type accounts struct {
|
type accounts struct {
|
||||||
AddrHashes []common.Hash
|
AddrHashes []common.Hash
|
||||||
Accounts [][]byte
|
Accounts [][]byte
|
||||||
|
|
@ -370,6 +373,9 @@ func (s *stateSet) encode(w io.Writer) error {
|
||||||
|
|
||||||
// decode deserializes the content from the rlp stream into the state set.
|
// decode deserializes the content from the rlp stream into the state set.
|
||||||
func (s *stateSet) decode(r *rlp.Stream) error {
|
func (s *stateSet) decode(r *rlp.Stream) error {
|
||||||
|
if err := r.Decode(&s.rawStorageKey); err != nil {
|
||||||
|
return fmt.Errorf("load diff raw storage key flag: %v", err)
|
||||||
|
}
|
||||||
type accounts struct {
|
type accounts struct {
|
||||||
AddrHashes []common.Hash
|
AddrHashes []common.Hash
|
||||||
Accounts [][]byte
|
Accounts [][]byte
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue