2
2
3
3
import com .strategyobject .substrateclient .rpc .RpcGeneratedSectionFactory ;
4
4
import com .strategyobject .substrateclient .rpc .api .BlockHash ;
5
- import com .strategyobject .substrateclient .rpc .api .section .Chain ;
6
5
import com .strategyobject .substrateclient .tests .containers .SubstrateVersion ;
7
6
import com .strategyobject .substrateclient .tests .containers .TestSubstrateContainer ;
8
7
import com .strategyobject .substrateclient .transport .ws .WsProvider ;
@@ -39,7 +38,7 @@ void getFinalizedHead() throws Exception {
39
38
val chain = RpcGeneratedSectionFactory .create (Chain .class , wsProvider );
40
39
val result = chain .getFinalizedHead ().get (WAIT_TIMEOUT , TimeUnit .SECONDS );
41
40
42
- assertNotEquals (BigInteger .ZERO , new BigInteger (result .getData ()));
41
+ assertNotEquals (BigInteger .ZERO , new BigInteger (result .getValue ()));
43
42
}
44
43
}
45
44
@@ -63,7 +62,7 @@ void subscribeNewHeads() throws Exception {
63
62
.atMost (WAIT_TIMEOUT * 2 , TimeUnit .SECONDS )
64
63
.untilAtomic (blockCount , greaterThan (2 ));
65
64
66
- assertNotEquals (BigInteger .ZERO , new BigInteger (blockHash .get ().getData ()));
65
+ assertNotEquals (BigInteger .ZERO , new BigInteger (blockHash .get ().getValue ()));
67
66
68
67
val result = unsubscribeFunc .get ().get (WAIT_TIMEOUT , TimeUnit .SECONDS );
69
68
@@ -77,7 +76,7 @@ void getBlockHash() throws Exception {
77
76
val chain = RpcGeneratedSectionFactory .create (Chain .class , wsProvider );
78
77
val result = chain .getBlockHash (0 ).get (WAIT_TIMEOUT , TimeUnit .SECONDS );
79
78
80
- assertNotEquals (BigInteger .ZERO , new BigInteger (result .getData ()));
79
+ assertNotEquals (BigInteger .ZERO , new BigInteger (result .getValue ()));
81
80
}
82
81
}
83
82
@@ -100,11 +99,11 @@ void getBlock() throws Exception {
100
99
val number = height .get ();
101
100
val blockHash = chain .getBlockHash (number ).get (WAIT_TIMEOUT , TimeUnit .SECONDS );
102
101
103
- assertNotEquals (BigInteger .ZERO , new BigInteger (blockHash .getData ()));
102
+ assertNotEquals (BigInteger .ZERO , new BigInteger (blockHash .getValue ()));
104
103
105
104
val block = chain .getBlock (blockHash ).get (WAIT_TIMEOUT , TimeUnit .SECONDS );
106
105
107
- assertNotEquals (BigInteger .ZERO , new BigInteger (block .getBlock ().getHeader ().getParentHash ().getData ()));
106
+ assertNotEquals (BigInteger .ZERO , new BigInteger (block .getBlock ().getHeader ().getParentHash ().getValue ()));
108
107
Assertions .assertEquals (number , block .getBlock ().getHeader ().getNumber ().getValue ().intValue ());
109
108
}
110
109
}
0 commit comments