Verify rawtx
This commit is contained in:
parent
bdaac63f3e
commit
d1a48e7d2d
|
@ -288,6 +288,11 @@ func (s *lwdStreamer) SendTransaction(ctx context.Context, rawtx *walletrpc.RawT
|
||||||
// Result:
|
// Result:
|
||||||
// "hex" (string) The transaction hash in hex
|
// "hex" (string) The transaction hash in hex
|
||||||
|
|
||||||
|
// Verify rawtx
|
||||||
|
if rawtx == nil || rawtx.Data == nil {
|
||||||
|
return nil, errors.New("Bad transaction data")
|
||||||
|
}
|
||||||
|
|
||||||
// Construct raw JSON-RPC params
|
// Construct raw JSON-RPC params
|
||||||
params := make([]json.RawMessage, 1)
|
params := make([]json.RawMessage, 1)
|
||||||
txJSON, err := json.Marshal(hex.EncodeToString(rawtx.Data))
|
txJSON, err := json.Marshal(hex.EncodeToString(rawtx.Data))
|
||||||
|
|
Loading…
Reference in New Issue