mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-13 05:45:02 +00:00
consensus: only use previous proposal if it has something in it
It might just be uninitialized it doesn't really make sense using zero-length previous proposal anyway.
This commit is contained in:
parent
62a11807a8
commit
d1e02c393d
1 changed files with 1 additions and 1 deletions
|
@ -553,7 +553,7 @@ func (s *service) getVerifiedTx() []block.Transaction {
|
||||||
|
|
||||||
var txx []mempool.TxWithFee
|
var txx []mempool.TxWithFee
|
||||||
|
|
||||||
if s.dbft.ViewNumber > 0 {
|
if s.dbft.ViewNumber > 0 && len(s.lastProposal) > 0 {
|
||||||
txx = make([]mempool.TxWithFee, 0, len(s.lastProposal))
|
txx = make([]mempool.TxWithFee, 0, len(s.lastProposal))
|
||||||
for i := range s.lastProposal {
|
for i := range s.lastProposal {
|
||||||
if tx, fee, ok := pool.TryGetValue(s.lastProposal[i]); ok {
|
if tx, fee, ok := pool.TryGetValue(s.lastProposal[i]); ok {
|
||||||
|
|
Loading…
Reference in a new issue