mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 23:25:22 +00:00
block: remove Base.Verify()
It's a no-op and there is nothing we can do about it, header contents could only be checked against chain state, there is nothing to check for internal consistency.
This commit is contained in:
parent
d2b37adf95
commit
2e876b5593
2 changed files with 0 additions and 13 deletions
|
@ -64,12 +64,6 @@ type baseAux struct {
|
|||
Witnesses []transaction.Witness `json:"witnesses"`
|
||||
}
|
||||
|
||||
// Verify verifies the integrity of the Base.
|
||||
func (b *Base) Verify() bool {
|
||||
// TODO: Need a persisted blockchain for this.
|
||||
return true
|
||||
}
|
||||
|
||||
// Hash returns the hash of the block.
|
||||
func (b *Base) Hash() util.Uint256 {
|
||||
if b.hash.Equals(util.Uint256{}) {
|
||||
|
|
|
@ -264,9 +264,6 @@ func (bc *Blockchain) init() error {
|
|||
}
|
||||
headerSliceReverse(headers)
|
||||
for _, h := range headers {
|
||||
if !h.Verify() {
|
||||
return fmt.Errorf("bad header %d/%s in the storage", h.Index, h.Hash())
|
||||
}
|
||||
bc.headerList.Add(h.Hash())
|
||||
}
|
||||
}
|
||||
|
@ -506,10 +503,6 @@ func (bc *Blockchain) addHeaders(verify bool, headers ...*block.Header) (err err
|
|||
if int(h.Index) < headerList.Len() {
|
||||
continue
|
||||
}
|
||||
if !h.Verify() {
|
||||
err = fmt.Errorf("header %v is invalid", h)
|
||||
return
|
||||
}
|
||||
if err = bc.processHeader(h, batch, headerList); err != nil {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue