Skip to content

Commit

Permalink
add more log for jury sign
Browse files Browse the repository at this point in the history
  • Loading branch information
studyzy committed May 15, 2019
1 parent c34cf50 commit 31d72a5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 10 additions & 2 deletions consensus/jury/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"sync"
"time"

"encoding/json"
"github.com/dedis/kyber"
"github.com/ethereum/go-ethereum/rlp"
"github.com/palletone/go-palletone/common"
Expand Down Expand Up @@ -388,8 +389,15 @@ func GetTxSig(tx *modules.Transaction, ks *keystore.KeyStore, signer common.Addr
return nil, errors.New(msg)
}
log.DebugDynamic(func() string {
data,_:=rlp.EncodeToBytes(tx)
return fmt.Sprintf( "Jurior[%s] try to sign tx reqid:%s,signature:%x, tx rlpcode for debug:%x",signer.String(),tx.RequestHash().String(),sign, data)
data, err := rlp.EncodeToBytes(tx)
if err != nil {
return err.Error()
}
js, err := json.Marshal(tx)
if err != nil {
return err.Error()
}
return fmt.Sprintf("Jurior[%s] try to sign tx reqid:%s,signature:%x, tx json: %s\n rlpcode for debug: %x", signer.String(), tx.RequestHash().String(), sign, string(js), data)
})
return sign, nil
}
Expand Down
3 changes: 3 additions & 0 deletions gitpull.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
git remote set-url origin https://gitee.com/studyzy/go-palletone
git pull
git remote set-url origin https://github.com/palletone/go-palletone

0 comments on commit 31d72a5

Please sign in to comment.