Skip to content

Commit 21b534c

Browse files
Document PendingTxs + BuildBlock consensus engine requirement (#1835)
1 parent 0d617fd commit 21b534c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

snow/engine/common/message.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ import "fmt"
1111
type Message uint32
1212

1313
const (
14-
// PendingTxs notifies a consensus engine that
15-
// its VM has pending transactions
16-
// (i.e. it would like to add a new block/vertex to consensus)
14+
// PendingTxs notifies a consensus engine that its VM has pending
15+
// transactions.
16+
//
17+
// The consensus engine must eventually call BuildBlock at least once after
18+
// receiving this message. If the consensus engine receives multiple
19+
// PendingTxs messages between calls to BuildBlock, the engine may only call
20+
// BuildBlock once.
1721
PendingTxs Message = iota + 1
1822

1923
// StateSyncDone notifies the state syncer engine that the VM has finishing

0 commit comments

Comments
 (0)