consensus: return nil interface from getTx
This commit is contained in:
parent
68c78d818a
commit
d803dffca8
1 changed files with 7 additions and 1 deletions
|
@ -253,9 +253,15 @@ func (s *service) getTx(h util.Uint256) block.Transaction {
|
||||||
|
|
||||||
tx, _, _ := s.Config.Chain.GetTransaction(h)
|
tx, _, _ := s.Config.Chain.GetTransaction(h)
|
||||||
|
|
||||||
|
// this is needed because in case of absent tx dBFT expects to
|
||||||
|
// get nil interface, not a nil pointer to any concrete type
|
||||||
|
if tx != nil {
|
||||||
return tx
|
return tx
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (s *service) verifyBlock(b block.Block) bool {
|
func (s *service) verifyBlock(b block.Block) bool {
|
||||||
coreb := &b.(*neoBlock).Block
|
coreb := &b.(*neoBlock).Block
|
||||||
for _, tx := range coreb.Transactions {
|
for _, tx := range coreb.Transactions {
|
||||||
|
|
Loading…
Reference in a new issue