core, eth, les, trie: add a prefix to contract code (#21080)
This commit is contained in:
@ -474,7 +474,7 @@ func (s *stateSync) process(req *stateReq) (int, error) {
|
||||
|
||||
// Iterate over all the delivered data and inject one-by-one into the trie
|
||||
for _, blob := range req.response {
|
||||
_, hash, err := s.processNodeData(blob)
|
||||
hash, err := s.processNodeData(blob)
|
||||
switch err {
|
||||
case nil:
|
||||
s.numUncommitted++
|
||||
@ -512,13 +512,13 @@ func (s *stateSync) process(req *stateReq) (int, error) {
|
||||
// processNodeData tries to inject a trie node data blob delivered from a remote
|
||||
// peer into the state trie, returning whether anything useful was written or any
|
||||
// error occurred.
|
||||
func (s *stateSync) processNodeData(blob []byte) (bool, common.Hash, error) {
|
||||
func (s *stateSync) processNodeData(blob []byte) (common.Hash, error) {
|
||||
res := trie.SyncResult{Data: blob}
|
||||
s.keccak.Reset()
|
||||
s.keccak.Write(blob)
|
||||
s.keccak.Sum(res.Hash[:0])
|
||||
committed, _, err := s.sched.Process([]trie.SyncResult{res})
|
||||
return committed, res.Hash, err
|
||||
err := s.sched.Process(res)
|
||||
return res.Hash, err
|
||||
}
|
||||
|
||||
// updateStats bumps the various state sync progress counters and displays a log
|
||||
|
Reference in New Issue
Block a user