Fix key generation in ethPub
This commit is contained in:
parent
0c55a11318
commit
589d27386a
@ -142,7 +142,7 @@ func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, sc
|
|||||||
var keyPair *ethutil.KeyPair
|
var keyPair *ethutil.KeyPair
|
||||||
var err error
|
var err error
|
||||||
if key[0:2] == "0x" {
|
if key[0:2] == "0x" {
|
||||||
keyPair, err = ethutil.NewKeyPairFromSec([]byte(ethutil.FromHex(key[0:2])))
|
keyPair, err = ethutil.NewKeyPairFromSec([]byte(ethutil.FromHex(key[2:])))
|
||||||
} else {
|
} else {
|
||||||
keyPair, err = ethutil.NewKeyPairFromSec([]byte(ethutil.FromHex(key)))
|
keyPair, err = ethutil.NewKeyPairFromSec([]byte(ethutil.FromHex(key)))
|
||||||
}
|
}
|
||||||
|
@ -184,6 +184,7 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageArgs, reply *string) error {
|
|||||||
i, _ := new(big.Int).SetString(args.Key, 10)
|
i, _ := new(big.Int).SetString(args.Key, 10)
|
||||||
hx = ethutil.Hex(i.Bytes())
|
hx = ethutil.Hex(i.Bytes())
|
||||||
}
|
}
|
||||||
|
ethutil.Config.Log.Debugf("[JSON] GetStorageAt(%s, %s)\n", args.Address, hx)
|
||||||
value := state.GetStorage(hx)
|
value := state.GetStorage(hx)
|
||||||
*reply = NewSuccessRes(GetStorageAtRes{Address: args.Address, Key: args.Key, Value: value})
|
*reply = NewSuccessRes(GetStorageAtRes{Address: args.Address, Key: args.Key, Value: value})
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user