Update sample test code
This commit is contained in:
parent
bdcc333b7d
commit
1eac2150b1
@ -4,7 +4,7 @@ import bdchain.api.grpc.GetLedgersResponse;
|
|||||||
import bdchain.api.grpc.TransactionType;
|
import bdchain.api.grpc.TransactionType;
|
||||||
|
|
||||||
public class Test {
|
public class Test {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) throws InterruptedException {
|
||||||
|
|
||||||
final String ledger = "test";
|
final String ledger = "test";
|
||||||
final int block_number = 1;
|
final int block_number = 1;
|
||||||
@ -21,6 +21,7 @@ public class Test {
|
|||||||
tlClient
|
tlClient
|
||||||
.sendTransaction(ledger, TransactionType.RECORD, "0x0", "0x1", "data".getBytes())
|
.sendTransaction(ledger, TransactionType.RECORD, "0x0", "0x1", "data".getBytes())
|
||||||
.getHash());
|
.getHash());
|
||||||
|
tlClient.shutdown();
|
||||||
|
|
||||||
AccountingChainClient acClient = new AccountingChainClient("localhost", 8013);
|
AccountingChainClient acClient = new AccountingChainClient("localhost", 8013);
|
||||||
System.out.println(acClient.blockNumber(ledger).getBlockNumber());
|
System.out.println(acClient.blockNumber(ledger).getBlockNumber());
|
||||||
@ -33,5 +34,6 @@ public class Test {
|
|||||||
acClient.getTransactionByBlockNumberAndIndex(ledger, block_number, index).toString());
|
acClient.getTransactionByBlockNumberAndIndex(ledger, block_number, index).toString());
|
||||||
System.out.println(
|
System.out.println(
|
||||||
acClient.getTransactionByBlockHashAndIndex(ledger, block_hash, index).toString());
|
acClient.getTransactionByBlockHashAndIndex(ledger, block_hash, index).toString());
|
||||||
|
acClient.shutdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user