bitcoinj icon indicating copy to clipboard operation
bitcoinj copied to clipboard

Transaction.coinbase: make complete transactions

Open msgilligan opened this issue 2 years ago • 3 comments

  • Transaction.coinbase() single factory method that makes a complete tx
  • Block: use this method to make genesis blocks
  • FakeTxBuilder: use this method to make fake coinbase transactions

msgilligan avatar Apr 10 '23 01:04 msgilligan

In my mind, this method is part of our future transaction builder. And I'd like Builder classes stay flexible and not be limited to single usecases, in this case coinbases with only out output.

schildbach avatar Apr 10 '23 09:04 schildbach

In my mind, this method is part of our future transaction builder. And I'd like Builder classes stay flexible and not be limited to single usecases, in this case coinbases with only out output.

We can always add a method that takes a list of outputs (when needed or when we create the actual builder implementation). In the meantime this removes unneeded mutation and helps us identify (see PR #3011) all our use-cases that create Coinbase transactions.

msgilligan avatar Apr 10 '23 17:04 msgilligan

Rebased and force-pushed.

msgilligan avatar Apr 14 '23 18:04 msgilligan