diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-09-25 17:19:00 +0800 |
---|---|---|
committer | Wei-Ning Huang <aitjcize@gmail.com> | 2018-09-25 17:19:00 +0800 |
commit | d844c339a128322dff180a6ccc6e6b241e917546 (patch) | |
tree | 53d9b1add43a5e242a51a097be8b55048eefa1c2 /simulation | |
parent | 6c8d26d2e797e8420fc3de4b15e4c556f968aba0 (diff) | |
download | tangerine-consensus-d844c339a128322dff180a6ccc6e6b241e917546.tar.gz tangerine-consensus-d844c339a128322dff180a6ccc6e6b241e917546.tar.zst tangerine-consensus-d844c339a128322dff180a6ccc6e6b241e917546.zip |
Fix naming of methods (#134)
- BlockDeliver -> BlockDelivered
- TotalOrderingDeliver -> TotalOrderingDelivered
- WitnessAckDeliver -> WitnessAckDelivered
- VerifyPayload -> VerifyPayloads
Diffstat (limited to 'simulation')
-rw-r--r-- | simulation/app.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/simulation/app.go b/simulation/app.go index 36567bf..ab0bfcd 100644 --- a/simulation/app.go +++ b/simulation/app.go @@ -60,8 +60,8 @@ func newSimApp(id types.NodeID, netModule *network) *simApp { func (a *simApp) BlockConfirmed(_ common.Hash) { } -// VerifyPayloads implements core.Application. -func (a *simApp) VerifyPayloads(payloads []byte) bool { +// VerifyPayload implements core.Application. +func (a *simApp) VerifyPayload(payloads []byte) bool { return true } @@ -101,9 +101,9 @@ func (a *simApp) PreparePayload(position types.Position) []byte { func (a *simApp) StronglyAcked(blockHash common.Hash) { } -// TotalOrderingDeliver is called when blocks are delivered by the total +// TotalOrderingDelivered is called when blocks are delivered by the total // ordering algorithm. -func (a *simApp) TotalOrderingDeliver(blockHashes common.Hashes, early bool) { +func (a *simApp) TotalOrderingDelivered(blockHashes common.Hashes, early bool) { fmt.Println("OUTPUT", a.NodeID, early, blockHashes) blockList := &BlockList{ ID: a.DeliverID, @@ -113,8 +113,8 @@ func (a *simApp) TotalOrderingDeliver(blockHashes common.Hashes, early bool) { a.DeliverID++ } -// BlockDeliver is called when a block in compaction chain is delivered. -func (a *simApp) BlockDeliver(block types.Block) { +// BlockDelivered is called when a block in compaction chain is delivered. +func (a *simApp) BlockDelivered(block types.Block) { func() { a.blockByHashMutex.Lock() defer a.blockByHashMutex.Unlock() @@ -165,6 +165,6 @@ func (a *simApp) BlockProcessedChan() <-chan types.WitnessResult { return a.witnessResultChan } -// WitnessAckDeliver is called when a witness ack is created. -func (a *simApp) WitnessAckDeliver(witnessAck *types.WitnessAck) { +// WitnessAckDelivered is called when a witness ack is created. +func (a *simApp) WitnessAckDelivered(witnessAck *types.WitnessAck) { } |