Update tests
This commit is contained in:
parent
0b156110f0
commit
91be741e87
@ -1 +1 @@
|
||||
Subproject commit d2792917e7ac2eabb02c14117544e40f99e278fb
|
||||
Subproject commit 70d4bb0f0c3a88f2ef459dfabdf521bf941dd667
|
@ -23,14 +23,11 @@ class AccountingChainClientTests {
|
||||
|
||||
private static final String ledger = "test";
|
||||
private static final int blockNumber = 2018;
|
||||
private static final String blockHashStr =
|
||||
"deadc0dedeadc0dedeadc0dedeadc0dedeadc0dedeadc0dedeadc0dedeadc0de";
|
||||
private static final String blockHashStr = "deadc0dedeadc0dedeadc0dedeadc0dedeadc0de";
|
||||
private static final ByteString blockHash =
|
||||
ByteString.copyFrom(Utils.hexStringToByteArray(blockHashStr));
|
||||
private static final ByteString parentHash =
|
||||
ByteString.copyFrom(
|
||||
Utils.hexStringToByteArray(
|
||||
"babefacebabefacebabefacebabefacebabefacebabefacebabefacebabeface"));
|
||||
ByteString.copyFrom(Utils.hexStringToByteArray("babefacebabefacebabefacebabefacebabeface"));
|
||||
private static final String[] witnessStrs = {
|
||||
"0404040404040404040404040404040404040404",
|
||||
"1313131313131313131313131313131313131313",
|
||||
@ -43,9 +40,7 @@ class AccountingChainClientTests {
|
||||
private static final long timestamp = 2018050400000L;
|
||||
private static final long size = 20180504L;
|
||||
private static final ByteString transactionsRoot =
|
||||
ByteString.copyFrom(
|
||||
Utils.hexStringToByteArray(
|
||||
"50bada5550bada5550bada5550bada5550bada5550bada5550bada5550bada55"));
|
||||
ByteString.copyFrom(Utils.hexStringToByteArray("50bada5550bada5550bada5550bada5550bada55"));
|
||||
|
||||
private static final int index = 0;
|
||||
private static final ByteString from =
|
||||
@ -64,14 +59,11 @@ class AccountingChainClientTests {
|
||||
ByteString.copyFrom(
|
||||
Utils.hexStringToByteArray(
|
||||
"4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c"));
|
||||
private static final String txHashStr =
|
||||
"0404040404040404040404040404040404040404040404040404040404040404";
|
||||
private static final String txHashStr = "0404040404040404040404040404040404040404";
|
||||
private static final ByteString txHash1 =
|
||||
ByteString.copyFrom(Utils.hexStringToByteArray(txHashStr));
|
||||
private static final ByteString txHash2 =
|
||||
ByteString.copyFrom(
|
||||
Utils.hexStringToByteArray(
|
||||
"1313131313131313131313131313131313131313131313131313131313131313"));
|
||||
ByteString.copyFrom(Utils.hexStringToByteArray("1313131313131313131313131313131313131313"));
|
||||
private static final Block block =
|
||||
Block.newBuilder()
|
||||
.setNumber(blockNumber)
|
||||
@ -133,7 +125,7 @@ class AccountingChainClientTests {
|
||||
@DisplayName("GetBlockByNumber#1")
|
||||
void getBlockByNumber1() throws ExecutionException, InterruptedException {
|
||||
// Block b = acClient.getBlockByNumber(ledger, blockNumber, true).get();
|
||||
Block b = acClient.getBlockByNumber(ledger, 2595, false).get();
|
||||
Block b = acClient.getBlockByNumber(ledger, blockNumber, false).get();
|
||||
System.out.println(b.getNumber());
|
||||
// Block blockFull =
|
||||
// Block.newBuilder(block)
|
||||
|
@ -84,7 +84,7 @@ class TransactionLedgerClientTests {
|
||||
Exception.class,
|
||||
() ->
|
||||
tlClient
|
||||
.sendTransaction(ledger, TransactionType.MESSAGE, null, "50bada5550bada5550bada5550bada5550bada55", null)
|
||||
.sendTransaction(ledger, TransactionType.MESSAGE, null, "50bada55", null)
|
||||
.get());
|
||||
Status s = Status.fromThrowable(e);
|
||||
assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
|
||||
|
Loading…
Reference in New Issue
Block a user