示例#1
0
        /// <summary>
        /// get block by hash
        /// </summary>
        /// <param name="hash"></param>
        /// <returns></returns>
        public async Task <object> GetBlockByHash(UInt256 hash)
        {
            var block = hash.GetBlock();

            if (block == null)
            {
                return(Error(ErrorCode.BlockHashInvalid));
            }

            return(ToBlockModel(block));
        }