Skip to content

Conversation

@sidhujag
Copy link

Remove the extra GetTransaction call by passing height back from IsInputAssociatedWithPubkey function and using it in CheckOutpoint. Also remove GetTransaction call in IsInputAssociatedWithPubkey in favor of GetUTXOCoins which is more efficient and does the same thing. The only difference is that GetUTXOCoins will fail if the collateral has moved whereas GetTransaction will not. I hope that is a safe assumption as if collateral is moved I would like to think that this function should fail anyway (seems to be only called when a masternode broadcast has occured)

Remove the extra GetTransaction call by passing height back from IsInputAssociatedWithPubkey function and using it in CheckOutpoint. Also remove GetTransaction call in IsInputAssociatedWithPubkey in favor of GetUTXOCoins which is more efficient and does the same thing. The only difference is that GetUTXOCoins will fail if the collateral has moved whereas GetTransaction will not. I hope that is a safe assumption as if collateral is moved I would like to think that this function should fail anyway (seems to be only called when a masternode broadcast has occured)
@sidhujag
Copy link
Author

Just another step to remove as many GetTransaction calls as possible (I know we still cannot remove the txindex dependency entirely but we are getting there 👍 )

@UdjinM6
Copy link

UdjinM6 commented Dec 14, 2017

I like the idea, I would however go even further #1783

@sidhujag
Copy link
Author

Agreed. Good thinking.

@sidhujag sidhujag closed this Dec 14, 2017
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.

2 participants