aboutsummaryrefslogtreecommitdiffstats
path: root/dex
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-18 20:41:39 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:23:39 +0800
commitb0fd5da490e5141ca456f145a1fd1e7a55b33e1f (patch)
tree03cfe89a3e92370ff5db261a640ad5991293f169 /dex
parent46100ae76f9fb81aaf267101c3801af1d7adcb88 (diff)
downloadgo-tangerine-b0fd5da490e5141ca456f145a1fd1e7a55b33e1f.tar
go-tangerine-b0fd5da490e5141ca456f145a1fd1e7a55b33e1f.tar.gz
go-tangerine-b0fd5da490e5141ca456f145a1fd1e7a55b33e1f.tar.bz2
go-tangerine-b0fd5da490e5141ca456f145a1fd1e7a55b33e1f.tar.lz
go-tangerine-b0fd5da490e5141ca456f145a1fd1e7a55b33e1f.tar.xz
go-tangerine-b0fd5da490e5141ca456f145a1fd1e7a55b33e1f.tar.zst
go-tangerine-b0fd5da490e5141ca456f145a1fd1e7a55b33e1f.zip
app: fixup message format
Diffstat (limited to 'dex')
-rw-r--r--dex/app.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/dex/app.go b/dex/app.go
index 9b13c32b8..317711e94 100644
--- a/dex/app.go
+++ b/dex/app.go
@@ -141,10 +141,10 @@ func (d *DexconApp) PreparePayload(position coreTypes.Position) (payload []byte,
for _, tx := range txs {
if tx.Nonce() != stateDB.GetNonce(addr) {
- log.Debug("break transaction", "tx.hash", tx.Hash(), "nonce", tx.Nonce(), "expect", stateDB.GetNonce(addr))
+ log.Debug("Break transaction", "tx.hash", tx.Hash(), "nonce", tx.Nonce(), "expect", stateDB.GetNonce(addr))
break
}
- log.Debug("receive transaction", "tx.hash", tx.Hash(), "nonce", tx.Nonce(), "amount", tx.Value())
+ log.Debug("Receive transaction", "tx.hash", tx.Hash(), "nonce", tx.Nonce(), "amount", tx.Value())
allTxs = append(allTxs, tx)
}
}
@@ -200,25 +200,25 @@ func (d *DexconApp) BlockDelivered(blockHash coreCommon.Hash, result coreTypes.F
block := d.blockchain.GetConfirmedBlockByHash(blockHash)
if block == nil {
- log.Error("can not get confirmed block")
+ log.Error("Can not get confirmed block")
return
}
var transactions types.Transactions
err := rlp.Decode(bytes.NewReader(block.Payload), &transactions)
if err != nil {
- log.Error("payload rlp decode", "error", err)
+ log.Error("Payload rlp decode failed", "error", err)
return
}
var witnessData witnessData
err = rlp.Decode(bytes.NewReader(block.Witness.Data), &witnessData)
if err != nil {
- log.Error("witness rlp decode", "error", err)
+ log.Error("Witness rlp decode failed", "error", err)
return
}
- log.Debug("block proposer id", "hash", block.ProposerID)
+ log.Debug("Block proposer id", "hash", block.ProposerID)
newBlock := types.NewBlock(&types.Header{
Number: new(big.Int).SetUint64(result.Height),
Time: big.NewInt(result.Timestamp.Unix()),
@@ -233,11 +233,11 @@ func (d *DexconApp) BlockDelivered(blockHash coreCommon.Hash, result coreTypes.F
_, err = d.blockchain.InsertPendingBlock([]*types.Block{newBlock})
if err != nil {
- log.Error("insert chain", "error", err)
+ log.Error("Insert chain", "error", err)
return
}
- log.Debug("insert pending block success", "height", result.Height)
+ log.Debug("Insert pending block success", "height", result.Height)
d.blockchain.RemoveConfirmedBlock(blockHash)
d.notify(result.Height)