lbrycrd icon indicating copy to clipboard operation
lbrycrd copied to clipboard

RPC calls ignore locktime transactions

Open BrannonKing opened this issue 4 years ago • 1 comments

Enable address decode and "is mine" for transactions containing the OP_CHECKLOCKTIMEVERIFY and OP_CHECKSEQUENCEVERIFY prefixes.

I'm not sure if should report something as spendable when the timelock has not yet elapsed, but we should afterward. Right now the "watch only" flag is required to see these.

BrannonKing avatar Feb 24 '20 20:02 BrannonKing

listreceivedbyaddress shows them if you run importaddress on the redeemscript.

In reviewing the code again, multisig addresses are not considered non-standard. They are first-class citizens. Therefore the "is mine" code correctly handles them. The timelock stuff, on the other hand, falls down the "nonstandard transaction" path. Therefore, it is only monitored if it is explicitly marked as "watch only".

So that leaves three options:

  1. Make the timelock scripts first-class citizens.
  2. Automatically add them as "watch only" scripts in addtimelockedaddress.
  3. Rely on somebody who cares to call importaddress on the redeemscript. Option 1 is more involved. Option 3 requires no work. Option 2 and 3 rely on the "watch only" stuff.

BrannonKing avatar Feb 26 '20 20:02 BrannonKing