public class FakeTxBuilder extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FakeTxBuilder.BlockPair |
static class |
FakeTxBuilder.DoubleSpends |
Constructor and Description |
---|
FakeTxBuilder() |
Modifier and Type | Method and Description |
---|---|
static FakeTxBuilder.BlockPair |
createFakeBlock(BlockStore blockStore,
long timeSeconds,
Transaction... transactions)
Emulates receiving a valid block that builds on top of the chain.
|
static FakeTxBuilder.BlockPair |
createFakeBlock(BlockStore blockStore,
Transaction... transactions) |
static FakeTxBuilder.DoubleSpends |
createFakeDoubleSpendTxns(NetworkParameters params,
Address to)
Creates two transactions that spend the same (fake) output.
|
static Transaction |
createFakeTx(NetworkParameters params,
Coin value,
Address to)
Create a fake TX of sufficient realism to exercise the unit tests.
|
static Transaction[] |
createFakeTx(NetworkParameters params,
Coin value,
Address to,
Address from)
Transaction[0] is a feeder transaction, supplying BTC to Transaction[1]
|
static Transaction |
createFakeTx(NetworkParameters params,
Coin value,
ECKey to)
Create a fake TX of sufficient realism to exercise the unit tests.
|
static Transaction |
createFakeTxWithChangeAddress(NetworkParameters params,
Coin value,
Address to,
Address changeOutput)
Create a fake TX of sufficient realism to exercise the unit tests.
|
static Block |
makeSolvedTestBlock(Block prev,
Address to,
Transaction... transactions) |
static Block |
makeSolvedTestBlock(BlockStore blockStore,
Address coinsTo) |
static Block |
makeSolvedTestBlock(Block prev,
Transaction... transactions) |
static Transaction |
roundTripTransaction(NetworkParameters params,
Transaction tx)
Roundtrip a transaction so that it appears as if it has just come from the wire
|
public static Transaction createFakeTxWithChangeAddress(NetworkParameters params, Coin value, Address to, Address changeOutput)
public static Transaction createFakeTx(NetworkParameters params, Coin value, Address to)
public static Transaction createFakeTx(NetworkParameters params, Coin value, ECKey to)
public static Transaction[] createFakeTx(NetworkParameters params, Coin value, Address to, Address from)
public static Transaction roundTripTransaction(NetworkParameters params, Transaction tx)
public static FakeTxBuilder.DoubleSpends createFakeDoubleSpendTxns(NetworkParameters params, Address to)
public static FakeTxBuilder.BlockPair createFakeBlock(BlockStore blockStore, long timeSeconds, Transaction... transactions)
public static FakeTxBuilder.BlockPair createFakeBlock(BlockStore blockStore, Transaction... transactions)
public static Block makeSolvedTestBlock(BlockStore blockStore, Address coinsTo) throws BlockStoreException
BlockStoreException
public static Block makeSolvedTestBlock(Block prev, Transaction... transactions) throws BlockStoreException
BlockStoreException
public static Block makeSolvedTestBlock(Block prev, Address to, Transaction... transactions) throws BlockStoreException
BlockStoreException
Copyright © 2014. All rights reserved.