org.bitcoinj.core.Transaction.Purpose Java Examples

The following examples show how to use org.bitcoinj.core.Transaction.Purpose. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WalletProtobufSerializerTest.java    From bcm-android with GNU General Public License v3.0 5 votes vote down vote up
@Test
public void raiseFeeTx() throws Exception {
    // Check basic tx serialization.
    Coin v1 = COIN;
    Transaction t1 = createFakeTx(UNITTEST, v1, myAddress);
    t1.setPurpose(Purpose.RAISE_FEE);
    myWallet.receivePending(t1, null);
    Wallet wallet1 = roundTrip(myWallet);
    Transaction t1copy = wallet1.getTransaction(t1.getHash());
    assertEquals(Purpose.RAISE_FEE, t1copy.getPurpose());
}
 
Example #2
Source File: WalletProtobufSerializerTest.java    From green_android with GNU General Public License v3.0 5 votes vote down vote up
@Test
public void raiseFeeTx() throws Exception {
    // Check basic tx serialization.
    Coin v1 = COIN;
    Transaction t1 = createFakeTx(PARAMS, v1, myAddress);
    t1.setPurpose(Purpose.RAISE_FEE);
    myWallet.receivePending(t1, null);
    Wallet wallet1 = roundTrip(myWallet);
    Transaction t1copy = wallet1.getTransaction(t1.getHash());
    assertEquals(Purpose.RAISE_FEE, t1copy.getPurpose());
}
 
Example #3
Source File: WalletProtobufSerializerTest.java    From GreenBits with GNU General Public License v3.0 5 votes vote down vote up
@Test
public void raiseFeeTx() throws Exception {
    // Check basic tx serialization.
    Coin v1 = COIN;
    Transaction t1 = createFakeTx(PARAMS, v1, myAddress);
    t1.setPurpose(Purpose.RAISE_FEE);
    myWallet.receivePending(t1, null);
    Wallet wallet1 = roundTrip(myWallet);
    Transaction t1copy = wallet1.getTransaction(t1.getHash());
    assertEquals(Purpose.RAISE_FEE, t1copy.getPurpose());
}