From c96eb17d5883a541f7852160d3d866d052cc4003 Mon Sep 17 00:00:00 2001 From: Yilun Date: Tue, 4 Sep 2018 14:35:37 -0700 Subject: [PATCH] Fix typo: singer -> signer Signed-off-by: Yilun --- core/ledger/header.go | 4 ++-- core/ledger/validator.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/ledger/header.go b/core/ledger/header.go index 8cd3f7668..41957c668 100644 --- a/core/ledger/header.go +++ b/core/ledger/header.go @@ -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 { diff --git a/core/ledger/validator.go b/core/ledger/validator.go index 2f893fec7..f2734798a 100644 --- a/core/ledger/validator.go +++ b/core/ledger/validator.go @@ -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 @@ -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) @@ -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) } }