BlockchainCommons / GordianWallet-iOS

iOS wallet linked by Torgap to your own full-node server
Other
47 stars 14 forks source link

Error parsing inputs #77

Closed javiervargas closed 4 years ago

javiervargas commented 4 years ago

Hello,

I'm running FN2 with my own fully node with txindex=1. I sent some coins to my wallet and when I tried to get details about the new incoming transaction I got this error message. I've commented details with @Fonta1n3

Regards. J.

Fonta1n3 commented 4 years ago

Thanks for the issue.

The cause: I changed getrawtransaction to gettransaction for parsing each inputs prev tx to fetch the addresses for each input with a pruned node. It worked in my limited testing because usually you send yourself tbtc for tests so the wallet of course knew about the inputs prev tx.

Fixes:

  1. stop fetching every inputs address. Its not really necessary anyway, or if it is not “known” simply display the outpoint instead.
  2. determine if the node has tx index set to 1 in which case we can callgetrawtransaction
  3. Use esplora to fetch inputs prev tx.
Fonta1n3 commented 4 years ago

this is fixed as of 0.1.52, please do update and try it out. For the record we now use Esplora to parse prevTx inputs our wallet does not "know" about so that we maintain functionality across pruned and txindex nodes.