Skip to content

Commit

Permalink
adjust p2p message to accept old version node's block
Browse files Browse the repository at this point in the history
  • Loading branch information
laizy committed Jan 10, 2019
1 parent ca1b039 commit e46e6ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions core/store/ledgerstore/state_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ package ledgerstore

import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"io"

"encoding/binary"

"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/log"
"github.com/ontio/ontology/common/serialization"
Expand Down
5 changes: 2 additions & 3 deletions p2pserver/message/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ package types

import (
"fmt"
"io"

"github.com/ontio/ontology/common"
ct "github.com/ontio/ontology/core/types"
"github.com/ontio/ontology/errors"
Expand Down Expand Up @@ -58,7 +56,8 @@ func (this *Block) Deserialization(source *common.ZeroCopySource) error {
eof := false
this.MerkleRoot, eof = source.NextHash()
if eof {
return io.ErrUnexpectedEOF
// to accept old node's block
this.MerkleRoot = common.UINT256_EMPTY
}
return nil
}

0 comments on commit e46e6ce

Please sign in to comment.