consensus: return nil interface from getTx

This commit is contained in:
Evgenii Stratonikov 2019-12-27 13:52:07 +03:00
parent 68c78d818a
commit d803dffca8

View file

@ -253,7 +253,13 @@ func (s *service) getTx(h util.Uint256) block.Transaction {
tx, _, _ := s.Config.Chain.GetTransaction(h)
return tx
// 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 nil
}
func (s *service) verifyBlock(b block.Block) bool {