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

rpcserver: Allow tx result creation without block. #476

Merged
merged 1 commit into from
Jul 28, 2015

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Jul 28, 2015

This pull request modifies the createTxRawResult code path along with callers to work with block headers as opposed to btcutil.Blocks. This in turn allows the code in handleGetRawTransaction and handleSearchRawTransactions to perform a much cheaper block header load as opposed to a full block load.

While here, also very slightly optimize the createVinList function to avoid creating a util.Tx wrapper and to take advantage of the btcutil.Amount type added after the function was originally written

@jrick
Copy link
Member

jrick commented Jul 28, 2015

ok

This commit modifies the createTxRawResult code path along with callers
to work with block headers as opposed to btcutil.Blocks.  This in turn
allows the code in handleGetRawTransaction and
handleSearchRawTransactions to perform a much cheaper block header load
as opposed to a full block load.

While here, also very slightly optimize the createVinList function to
avoid creating a util.Tx wrapper and to take advantage of the
btcutil.Amount type added after the function was originally written
@davecgh davecgh force-pushed the rpcserver_txrawresult branch from 86b14d0 to 506fc9f Compare July 28, 2015 23:44
@davecgh
Copy link
Member Author

davecgh commented Jul 28, 2015

@dajohi: Moved blkHashStr = blkHash.String() to the end of scope as requested.

@conformal-deploy conformal-deploy merged commit 506fc9f into btcsuite:master Jul 28, 2015
@davecgh davecgh deleted the rpcserver_txrawresult branch July 28, 2015 23: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