use of co.rsk.peg.BridgeState in project rskj by rsksmart.
the class EthModule method bridgeState.
public Map<String, Object> bridgeState() throws IOException, BlockStoreException {
Block block = blockchain.getBestBlock();
Repository repository = blockchain.getRepository().getSnapshotTo(block.getStateRoot()).startTracking();
BridgeSupport bridgeSupport = new BridgeSupport(config, repository, null, PrecompiledContracts.BRIDGE_ADDR, block);
byte[] result = bridgeSupport.getStateForDebugging();
BridgeState state = BridgeState.create(config.getBlockchainConfig().getCommonConstants().getBridgeConstants(), result);
return state.stateToMap();
}
Aggregations