private static List<Transaction> toTransactions(NeoGetBlock neoGetBlock) { return neoGetBlock.getBlock().getTransactions().stream().collect(Collectors.toList()); }
public NeoBlock getBlock() { return getResult(); }
assertThat(getBlock.getBlock(), is(notNullValue())); assertThat(getBlock.getBlock().getHash(), is("0x498b16db3fba92448fac63caeecb91ce38cb4b565de7d717d473f0dd37a1e816")); assertThat(getBlock.getBlock().getSize(), is(1217L)); assertThat(getBlock.getBlock().getVersion(), is(0)); assertThat(getBlock.getBlock().getPrevBlockHash(), is("0x045cabde4ecbd50f5e4e1b141eaf0842c1f5f56517324c8dcab8ccac924e3a39")); assertThat(getBlock.getBlock().getMerkleRootHash(), is("0x6afa63201b88b55ad2213e5a69a1ad5f0db650bc178fc2bedd2fb301c1278bf7")); assertThat(getBlock.getBlock().getTime(), is(1539968858L)); assertThat(getBlock.getBlock().getIndex(), is(1914006L)); assertThat(getBlock.getBlock().getNonce(), is("44ed38ca21ae8877")); assertThat(getBlock.getBlock().getNextConsensus(), is("AWZo4qAxhT8fwKL93QATSjCYCgHmCY1XLB")); assertThat(getBlock.getBlock().getScript(), is(notNullValue())); assertThat( getBlock.getBlock().getScript(), is( new Script( assertThat(getBlock.getBlock().getTransactions(), is(nullValue())); assertThat(getBlock.getBlock().getConfirmations(), is(7878)); assertThat(getBlock.getBlock().getNextBlockHash(), is("0x4a97ca89199627f877b6bffe865b8327be84b368d62572ef20953829c3501643"));
assertThat(getBlock.getBlock(), is(notNullValue())); assertThat(getBlock.getBlock().getHash(), is("0x498b16db3fba92448fac63caeecb91ce38cb4b565de7d717d473f0dd37a1e816")); assertThat(getBlock.getBlock().getSize(), is(1217L)); assertThat(getBlock.getBlock().getVersion(), is(0)); assertThat(getBlock.getBlock().getPrevBlockHash(), is("0x045cabde4ecbd50f5e4e1b141eaf0842c1f5f56517324c8dcab8ccac924e3a39")); assertThat(getBlock.getBlock().getMerkleRootHash(), is("0x6afa63201b88b55ad2213e5a69a1ad5f0db650bc178fc2bedd2fb301c1278bf7")); assertThat(getBlock.getBlock().getTime(), is(1539968858L)); assertThat(getBlock.getBlock().getIndex(), is(1914006L)); assertThat(getBlock.getBlock().getNonce(), is("44ed38ca21ae8877")); assertThat(getBlock.getBlock().getNextConsensus(), is("AWZo4qAxhT8fwKL93QATSjCYCgHmCY1XLB")); assertThat(getBlock.getBlock().getScript(), is(notNullValue())); assertThat( getBlock.getBlock().getScript(), CoreMatchers.is( new Script( assertThat(getBlock.getBlock().getTransactions(), hasSize(3)); getBlock.getBlock().getTransactions(), containsInAnyOrder( new Transaction( assertThat(getBlock.getBlock().getConfirmations(), is(7878)); assertThat(getBlock.getBlock().getNextBlockHash(), is("0x4a97ca89199627f877b6bffe865b8327be84b368d62572ef20953829c3501643"));