Skip to content

KeychainTxOutIndex API inconsistent with respect to references (should be owned) #1482

@LLFourn

Description

@LLFourn

Methods often take a reference to a K or an owned K. They often return a reference or sometimes an owned K. I think we should always just used owned. Also I think we should owned ScriptBuf's rather than Script. The reason is they are both usually small and fine to copy:

  • K is usually small and needs to be anyway if you derive lots of spks from a keychain (it is copied each time you do that into the underlying SpkTxOutIndex.
  • script pubkeys are usually small unless you are doing stuff like DoSing the mempool/utxo set which we don't need to support.

It should be owned everywhere and this should be brought up to the Wallet API.

Metadata

Metadata

Assignees

Labels

apiA breaking API changegood first issueGood for newcomers

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions