Esempio n. 1
0
        public BlockHandle OpenBlock(BlockHandle parent, out BlockUcid ucid)
        {
            var returnCode = PInvokes.terab_utxo_open_block(_connection, 0, out int handleAsInt, out PInvokes.BlockUcid blockUcid);

            if (returnCode != PInvokes.ReturnCode.SUCCESS)
            {
                throw new Exception(returnCode.ToString());
            }

            var ucidBytes = blockUcid.value;
            var left      = BitConverter.ToUInt64(ucidBytes, 0);
            var right     = BitConverter.ToUInt64(ucidBytes, 8);

            ucid = new BlockUcid(left, right);
            return(new BlockHandle(handleAsInt));
        }
Esempio n. 2
0
 public Block UtxoGetUncommittedBlock(BlockUcid blockUcid) => throw new NotImplementedException();
Esempio n. 3
0
 internal extern static ReturnCode terab_utxo_open_block(SafeConnectionHandle connection, Int32 parentHandle, out Int32 blockHandle, out BlockUcid ucid);