mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-19 05:33:44 +01:00
FakeTxBuilder: don't create unnecessary transaction in createFakeBlock()
This commit is contained in:
parent
c309994e99
commit
8a047d48b9
@ -266,8 +266,7 @@ public class FakeTxBuilder {
|
|||||||
Instant time, int height, Transaction... transactions) {
|
Instant time, int height, Transaction... transactions) {
|
||||||
try {
|
try {
|
||||||
Block previousBlock = previousStoredBlock.getHeader();
|
Block previousBlock = previousStoredBlock.getHeader();
|
||||||
Address to = randomAddress(previousBlock.getParams());
|
Block b = previousBlock.createNextBlock(null, version, time, height);
|
||||||
Block b = previousBlock.createNextBlock(to, version, time, height);
|
|
||||||
// Coinbase tx was already added.
|
// Coinbase tx was already added.
|
||||||
for (Transaction tx : transactions) {
|
for (Transaction tx : transactions) {
|
||||||
tx.getConfidence().setSource(TransactionConfidence.Source.NETWORK);
|
tx.getConfidence().setSource(TransactionConfidence.Source.NETWORK);
|
||||||
|
Loading…
Reference in New Issue
Block a user