Commit 3990abb9 authored by lihailei's avatar lihailei

fix sign.

parent 3ddb25ce
......@@ -87,8 +87,8 @@ func (c *ContractController) Invoke() {
func sendTx(execer string, privKey string, body []byte) (string, error) {
tx := &types.Transaction{Execer: []byte(execer), Payload: body, Fee: 1e6}
tx.Nonce = r.Int63()
//address, priv := Genaddress()
tx.Sign(types.SECP256K1, Getprivkey(privKey))
_, priv := Genaddress()
tx.Sign(types.SECP256K1, priv)
tx.To = account.ExecAddress(execer).String()
data := ToHex(types.Encode(tx))
params := jsonrpc.RawParm{
......
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