aboutsummaryrefslogtreecommitdiffstats
path: root/simulation
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-09-25 17:19:00 +0800
committerWei-Ning Huang <aitjcize@gmail.com>2018-09-25 17:19:00 +0800
commitd844c339a128322dff180a6ccc6e6b241e917546 (patch)
tree53d9b1add43a5e242a51a097be8b55048eefa1c2 /simulation
parent6c8d26d2e797e8420fc3de4b15e4c556f968aba0 (diff)
downloaddexon-consensus-d844c339a128322dff180a6ccc6e6b241e917546.tar
dexon-consensus-d844c339a128322dff180a6ccc6e6b241e917546.tar.gz
dexon-consensus-d844c339a128322dff180a6ccc6e6b241e917546.tar.bz2
dexon-consensus-d844c339a128322dff180a6ccc6e6b241e917546.tar.lz
dexon-consensus-d844c339a128322dff180a6ccc6e6b241e917546.tar.xz
dexon-consensus-d844c339a128322dff180a6ccc6e6b241e917546.tar.zst
dexon-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.go16
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) {
}