Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SearchRawTransaction calls for latest API. #61

Merged
merged 1 commit into from
Aug 26, 2015

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Aug 23, 2015

This pull request depends on btcsuite/btcd#487

This pull request modifies the SearchRawTransactions and SearchRawTransactionsVerbose functions to work properly with the latest searchrawtransactions API in btcd.

In particular, this involves changing the return value from []*btcjson.TxRawResult to []*btcjson.SearchRawTransactionResult and adding the additional optional parameter which specifies whether or not to include information about the previous outputs.

cmd := btcjson.NewSearchRawTransactionsCmd(addr, verbose, &skip, &count)
prevOut := btcjson.Int(0)
if includePrevOut {
prevOut = btcjson.Int(1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*prevOut = 1 since it's already allocated, or leave it null for 0 and allocate for 1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Will change.

This commit modifies the SearchRawTransactions and
SearchRawTransactionsVerbose functions to work properly with the latest
searchrawtransactions API in btcd.

In particular, this involves changing the return value from
[]*btcjson.TxRawResult to []*btcjson.SearchRawTransactionResult and
adding the additional optional parameter which specifies whether or not
to include information about the previous outputs.
@jrick
Copy link
Member

jrick commented Aug 26, 2015

ok

@conformal-deploy conformal-deploy merged commit 34db203 into btcsuite:master Aug 26, 2015
@davecgh davecgh deleted the vin_prevout branch August 26, 2015 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants