mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
rpc: use base64 for submitblock
and sendrawtransaction
Changes ported from https://github.com/neo-project/neo-modules/pull/394.
This commit is contained in:
parent
e700fb2c96
commit
20f8fe5699
5 changed files with 17 additions and 31 deletions
|
@ -438,7 +438,7 @@ func (c *Client) invokeSomething(method string, p request.RawParams, signers []t
|
|||
// been broadcasted to the network.
|
||||
func (c *Client) SendRawTransaction(rawTX *transaction.Transaction) (util.Uint256, error) {
|
||||
var (
|
||||
params = request.NewRawParams(hex.EncodeToString(rawTX.Bytes()))
|
||||
params = request.NewRawParams(rawTX.Bytes())
|
||||
resp = new(result.RelayResult)
|
||||
)
|
||||
if err := c.performRequest("sendrawtransaction", params, resp); err != nil {
|
||||
|
@ -458,7 +458,7 @@ func (c *Client) SubmitBlock(b block.Block) (util.Uint256, error) {
|
|||
if err := buf.Err; err != nil {
|
||||
return util.Uint256{}, err
|
||||
}
|
||||
params = request.NewRawParams(hex.EncodeToString(buf.Bytes()))
|
||||
params = request.NewRawParams(buf.Bytes())
|
||||
|
||||
if err := c.performRequest("submitblock", params, resp); err != nil {
|
||||
return util.Uint256{}, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue