Commit 8dd1c7c0 authored by duanjinfei's avatar duanjinfei

fix v s r value overflow

parent b14099a2
......@@ -95,12 +95,12 @@ func broadcastTx(cfg *tool.Config, client ring.RingServiceClient) error {
func constructionEthLegacyTx(tran *types.Transaction) v1.EthLegacyTx {
//v, r, s := tran.RawSignatureValues()
toAddr := metatypes.BytesToAddress(tran.To().Bytes())
//nv := metatypes.NewBigInt(0)
//nv.Set(v)
//nr := metatypes.NewBigInt(0)
//nr.Set(r)
//ns := metatypes.NewBigInt(0)
//ns.Set(s)
nv := metatypes.NewBigInt(0)
nv.SetString("236", 10)
nr := metatypes.NewBigInt(0)
nr.SetString("103540811401203670175009355687785215115755383244051477218884606498783205629384", 10)
ns := metatypes.NewBigInt(0)
ns.SetString("36344895504144551167108335919542572829921945163306838661809661076218798969327", 10)
rawTx := v1.EthLegacyTx{
Nonce: tran.Nonce(),
GasPrice: metatypes.NewBigInt(tran.GasPrice().Int64()),
......@@ -108,9 +108,9 @@ func constructionEthLegacyTx(tran *types.Transaction) v1.EthLegacyTx {
To: &toAddr,
Value: metatypes.NewBigInt(tran.Value().Int64()),
Data: tran.Data(),
V: metatypes.NewBigInt(236),
R: metatypes.NewBigInt(103540811401203670175009355687785215115755383244051477218884606498783205629384),
S: metatypes.NewBigInt(36344895504144551167108335919542572829921945163306838661809661076218798969327),
V: nv,
R: nr,
S: ns,
}
return 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