public IRpcMethodResult GenerateNewBlock(string minerName, string address = null, string remark = null,
                                                 int format = 0)
        {
            try
            {
                BlockComponent blockComponent = new BlockComponent();
                var            block          = blockComponent.CreateNewBlock(minerName, address, remark);

                if (block != null)
                {
                    if (format == 0)
                    {
                        var bytes = block.Serialize();

                        var block1 = new BlockMsg();
                        int index  = 0;
                        block1.Deserialize(bytes, ref index);
                        var result = Base16.Encode(bytes);
                        return(Ok(result));
                    }
                    else
                    {
                        LogHelper.Warn(block.ToString());
                        return(Ok(block));
                    }
                }
                else
                {
                    return(Ok());
                }
            }
            catch (CommonException ce)
            {
                return(Error(ce.ErrorCode, ce.Message, ce));
            }
            catch (Exception ex)
            {
                return(Error(ErrorCode.UNKNOWN_ERROR, ex.Message, ex));
            }
        }