public static Long calculateChainId ( EthereumTransaction eTrans ) { Long result = null ; long rawResult = EthereumUtil . convertVarNumberToLong ( new RLPElement ( new byte [ 0 ] , eTrans . getSig_v ( ) ) ) ; if ( ! ( ( rawResult == EthereumUtil . LOWER_REAL_V ) || ( rawResult == ( LOWER_REAL_V + 1 ) ) ) ) { result = ( rawResult - EthereumUtil . CHAIN_ID_INC ) / 2 ; } return result ; }
Calculates the chain Id