public Block GetBlockByHeight(long height) { if (!_network.NetworkIsEthereum()) { height--; } return(GetBlockByHeightInternal(height)); }
public static bool TransactionSucceeded(Transaction transaction, TransactionReceipt receipt, NetworkType network) { if (network.NetworkIsEthereum()) { if (receipt == null) { throw new NullReceiptException(); } if (transaction.BlockNumber.Value.ToLong() < ByzantiumForkBlockNumber(network)) { return(receipt.GasUsed.Value < transaction.Gas); } if (receipt.Status == null) { return(false); } return(receipt.Status.Value.ToLong() == 1); } return(true); }