Skip to content

Store output index and amount, optimize lookup

Dagur Valberg Johannsson requested to merge github/fork/dagurval/db-perf into master

Created by: dagurval

This adds output index and amount to the funding database row. The values are added with varint, trading more CPU time for lesser storage use.

Output index in spending table was also converted to varint.

Optimization: When looking up spending input, we now assume we have a match when there is exactly one tx that matches txid prefix AND output index on the blockchain.

Optimization: When looking up funding outputs, we no longer need to fetch transactions from bitcoind to find output index and amount.

Merge request reports