LearnBitcoin

Bitcoin Dev Archive 2011

Pull request: Optimize database writes for transactions with lots of TxIns.

1 message, 5 Sep 2011. Started by Gavin Andresen.

Gavin Andresen

Permalink Original thread on gnusha.org

Gavin Andresen permalink original
And I'd appreciate review/feedback on this:
  https://github.com/bitcoin/bitcoin/pull/491

Patch from ArtForz, who discovered the problem.

The problem was chaining large transactions (transactions with lots of ins and outs) would make the berkeley db transaction log get very big, as the dependencies (TxIns) of a transaction might be re-written multiple times.

With this fix, each each transaction referred to by TxIns is written once.