Use correct error name in handleGetRawTransaction.

This commit corrects the error check from the createTxRawResult call in
handleGetRawTransaction.  It was previously given a different name which
resulted in the wrong error being checked.

Fixes #196.
This commit is contained in:
Dave Collins 2014-12-21 21:48:40 -06:00
parent f1cbd40713
commit 33546047e3

View file

@ -2413,11 +2413,11 @@ func handleGetRawTransaction(s *rpcServer, cmd btcjson.Cmd, closeChan <-chan str
} }
} }
rawTxn, jsonErr := createTxRawResult(s.server.netParams, c.Txid, mtx, rawTxn, err := createTxRawResult(s.server.netParams, c.Txid, mtx,
blk, maxidx, blksha) blk, maxidx, blksha)
if err != nil { if err != nil {
rpcsLog.Errorf("Cannot create TxRawResult for txSha=%s: %v", txSha, err) rpcsLog.Errorf("Cannot create TxRawResult for txSha=%s: %v", txSha, err)
return nil, jsonErr return nil, err
} }
return *rawTxn, nil return *rawTxn, nil
} }