-
Notifications
You must be signed in to change notification settings - Fork 100
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
client/dcr: Remove GetRawTransaction. #3012
Conversation
I will fix tests if these changes look like the right direction. They may take a little work. |
@@ -3787,12 +3779,12 @@ func (dcr *ExchangeWallet) findRedemptionsInMempool(contractOutpoints []outPoint | |||
} | |||
|
|||
for _, txHash := range mempoolTxs { | |||
tx, err := dcr.wallet.GetRawTransaction(dcr.ctx, txHash) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't getrawtransaction
work for mempool transaction even if txindex
is not enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for mempool transactions.
Should we leave it in with a note that it can only be used for mempool?
My reasoning is that if GetTransaction
is good enough for rpc clients with an spv node, then it's good enough for full nodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to note for testing: the dcr simnet test harness node alpha has --txindex
; node beta does not have a tx index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beta wallet is also an --spv wallet so I dont think we have a simnet wallet connecting to beta node
Made you a conflict @JoeGruffins. Don't miss the spelling fix for |
Ill work on fixing the tests. |
@@ -4654,7 +4655,7 @@ func TestFindBond(t *testing.T) { | |||
}, { | |||
name: "bad msgtx", | |||
coinID: bond.CoinID, | |||
txRes: txFn(nil, bond.SignedTx[1:]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not idea why I had to change this, maybe I should.
GetRawTransaction will error if txindex is not specified on the node, and until now GetTransaction has been good enough for client.
GetRawTransaction will error if txindex is not specified on the node, and until now GetTransaction has been good enough for client.
GetRawTransaction will error if txindex is not specified on the node, and until now GetTransaction has been good enough for client.
Until 12a90a7 we were only using
GetRawTransaction
for mempool redemptions, which it will not error for https://github.com/decred/dcrd/blob/7735cbb4e11b61636e88ad07e9ad8c1a30dd4047/internal/rpcserver/rpcserver.go#L2899closes #2947