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;
|
||||
|
||||
public class Test {
|
||||
public static void main(String[] args) {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
|
||||
final String ledger = "test";
|
||||
final int block_number = 1;
|
||||
@ -21,6 +21,7 @@ public class Test {
|
||||
tlClient
|
||||
.sendTransaction(ledger, TransactionType.RECORD, "0x0", "0x1", "data".getBytes())
|
||||
.getHash());
|
||||
tlClient.shutdown();
|
||||
|
||||
AccountingChainClient acClient = new AccountingChainClient("localhost", 8013);
|
||||
System.out.println(acClient.blockNumber(ledger).getBlockNumber());
|
||||
@ -33,5 +34,6 @@ public class Test {
|
||||
acClient.getTransactionByBlockNumberAndIndex(ledger, block_number, index).toString());
|
||||
System.out.println(
|
||||
acClient.getTransactionByBlockHashAndIndex(ledger, block_hash, index).toString());
|
||||
acClient.shutdown();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user