Resolve warnings in comment
@@ -19,7 +19,8 @@ type BlockData interface {
Height() int64
PrevID() []byte
NextValidatorsHash() []byte
- // voters are subset of previous previous block's next validators
+ // Votes returns votes. Its voters are subset of previous-previous block's
+ // next validators
Votes() CommitVoteSet
NormalTransactions() TransactionList
PatchTransactions() TransactionList
@@ -84,8 +85,6 @@ type BlockCandidate interface {
Dispose()
}
-// ImportXXX is used as flag value of BlockManager.Import and
-// BlockManager.ImportBlock.
const (
ImportByForce = 0x1
)
@@ -106,7 +105,7 @@ type BlockManager interface {
// Propose proposes a Block following the parent Block.
// The result is asynchronously notified by cb. canceler cancels the
// operation. canceler returns true and cb is not called if the
- // cancellation was successful. Proposed block can be Commited or
+ // cancellation was successful. The proposed block can be Committed or
// Finalized.
Propose(
parentID []byte,
@@ -118,8 +117,10 @@ type BlockManager interface {
// Import creates a Block from blockBytes and verifies the block.
// The result is asynchronously notified by cb. canceler cancels the
// operation. canceler returns true and cb is not called if the
- // cancellation was successful. Imported block can be Commited or
+ // cancellation was successful. The imported block can be Committed or
// Finalized.
+ // Perform forced state sync if the transition's execution result and block
+ // result does not match and flags' ImportByForce bit is on.
Import(r io.Reader, flags int, cb func(BlockCandidate, error)) (canceler Canceler, err error)
ImportBlock(blk BlockData, flags int, cb func(BlockCandidate, error)) (canceler Canceler, err error)
@@ -131,13 +132,13 @@ type BlockManager interface {
GetTransactionInfo(id []byte) (TransactionInfo, error)
Term()
- // WaitTransaction waits for a transaction with timestamp between
+ // WaitForTransaction waits for a transaction with timestamp between
// bi.Timestamp() - TimestampThreshold and current time +
// TimestampThreshold. If such a transaction is available now, the function
// returns false and callback cb is not called.
WaitForTransaction(parentID []byte, cb func()) bool
- // SendAndWaitTransaction sends a transaction, and get a channel to
+ // SendTransactionAndWait sends a transaction, and get a channel to
// to wait for the result of it.
SendTransactionAndWait(result []byte, height int64, txi interface{}) (tid []byte, rc <-chan interface{}, err error)
@@ -145,13 +146,13 @@ type BlockManager interface {
// and wait for the result.
WaitTransactionResult(id []byte) (rc <-chan interface{}, err error)
- // ExportBlock exports blocks assuring specified block ranges.
+ // ExportBlocks exports blocks assuring specified block ranges.
ExportBlocks(from, to int64, dst db.Database, on func(height int64) error) error
// ExportGenesis exports genesis to the writer based on the block.
ExportGenesis(blk Block, writer GenesisStorageWriter) error
- // GetGenesisVotes returns available votes from genesis storage.
+ // GetGenesisData returns available votes from genesis storage.
// They are available only when it starts from genesis.
GetGenesisData() (Block, CommitVoteSet, error)
