Skip to content

Commit

Permalink
Fix typo: singer -> signer
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <[email protected]>
  • Loading branch information
yilunzhang authored and doraemon0 committed Sep 5, 2018
1 parent 565457d commit c96eb17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/ledger/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@ func (h *Header) UnmarshalJson(data []byte) error {
return err
}

singer, err := HexStringToBytes(headerInfo.Signer)
signer, err := HexStringToBytes(headerInfo.Signer)
if err != nil {
return err
}
h.Signer = singer
h.Signer = signer

signature, err := HexStringToBytes(headerInfo.Signature)
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions core/ledger/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func HeaderCheck(header *Header, receiveTime int64) error {
return err
}
miner, err = proposerBlock.GetSigner()
log.Infof("verification: block singer should be: %s which is the signer of block %d",
log.Infof("verification: block signer should be: %s which is the signer of block %d",
common.BytesToHexString(miner), proposerBlockHeight)
if err != nil {
return err
Expand All @@ -123,7 +123,7 @@ func HeaderCheck(header *Header, receiveTime int64) error {
if err != nil {
return err
}
log.Infof("verification: block singer should be %s which is genesis block proposer",
log.Infof("verification: block signer should be %s which is genesis block proposer",
common.BytesToHexString(miner))
case WinningTxnHash:
txn, err := DefaultLedger.Store.GetTransaction(winningHash)
Expand All @@ -141,11 +141,11 @@ func HeaderCheck(header *Header, receiveTime int64) error {
return err
}
txnHash := txn.Hash()
log.Infof("verification: block singer should be %s which is got in sigchain transaction %s",
log.Infof("verification: block signer should be %s which is got in sigchain transaction %s",
common.BytesToHexString(miner), common.BytesToHexString(txnHash.ToArrayReverse()))
case WinningNilHash:
miner = prevHeader.Signer
log.Infof("verification: block singer should be: %s which is the signer of previous block %d",
log.Infof("verification: block signer should be: %s which is the signer of previous block %d",
common.BytesToHexString(miner), prevHeader.Height)
}
}
Expand Down

0 comments on commit c96eb17

Please sign in to comment.