Commit fcbafb8d authored by duanjinfei's avatar duanjinfei

fix RawSignatureValues

parent 8587b02d
...@@ -249,6 +249,12 @@ func BatchRecoverTxHandler(tranArr []*types.Transaction, cfg *tool.Config) error ...@@ -249,6 +249,12 @@ func BatchRecoverTxHandler(tranArr []*types.Transaction, cfg *tool.Config) error
rawTxArr := make([]*v1.MetaTxBase, 0) rawTxArr := make([]*v1.MetaTxBase, 0)
toaddr := metatypes.BytesToAddress(tran.To().Bytes()) toaddr := metatypes.BytesToAddress(tran.To().Bytes())
hash := metatypes.HexToHash(tran.Hash().Hex()) hash := metatypes.HexToHash(tran.Hash().Hex())
nv := metatypes.NewBigInt(0)
nv.Set(v)
nr := metatypes.NewBigInt(0)
nr.Set(r)
ns := metatypes.NewBigInt(0)
ns.Set(s)
rawTx := v1.MetaTxBase{ rawTx := v1.MetaTxBase{
TxType: uint32(tran.Type()), TxType: uint32(tran.Type()),
ChainId: metatypes.NewBigInt(tran.ChainId().Int64()), ChainId: metatypes.NewBigInt(tran.ChainId().Int64()),
...@@ -259,9 +265,9 @@ func BatchRecoverTxHandler(tranArr []*types.Transaction, cfg *tool.Config) error ...@@ -259,9 +265,9 @@ func BatchRecoverTxHandler(tranArr []*types.Transaction, cfg *tool.Config) error
Value: metatypes.NewBigInt(tran.Value().Int64()), Value: metatypes.NewBigInt(tran.Value().Int64()),
Data: tran.Data(), Data: tran.Data(),
AccessList: nil, AccessList: nil,
V: metatypes.NewBigInt(v.Int64()), V: nv,
R: metatypes.NewBigInt(r.Int64()), R: nr,
S: metatypes.NewBigInt(s.Int64()), S: ns,
TxHash: &hash, TxHash: &hash,
} }
rawTxArr = append(rawTxArr, &rawTx) rawTxArr = append(rawTxArr, &rawTx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment