Commit 820571b3 authored by madengji's avatar madengji

add clang format

parent cdf51d68
Language: 'Proto'
BasedOnStyle: 'LLVM'
AccessModifierOffset: '-1'
AlignAfterOpenBracket: 'Align'
AlignConsecutiveAssignments: 'true'
AlignConsecutiveDeclarations: 'true'
AlignEscapedNewlinesLeft: 'true'
AlignOperands: 'true'
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'true'
AllowShortBlocksOnASingleLine: 'true'
AllowShortCaseLabelsOnASingleLine: 'true'
ColumnLimit: '200'
IndentWidth: '4'
ContinuationIndentWidth: '4'
TabWidth: '4'
TabWidth: '4'
ReflowComments: 'true'
SortIncludes: 'true'
AllowShortFunctionsOnASingleLine: 'Empty'
AllowShortIfStatementsOnASingleLine: 'true'
consensus/raft/tools/scripts/grpc33.log
consensus/raft/tools/scripts/logs/
*.orig
store/kvmvcc/1.png
store/kvmvcc/cpu.pprof
store/kvmvcc/kvmvcc.test
store/mpt/1.png
store/mpt/cpu.pprof
store/mpt/mpt.test
tool
.vscode
chain33 chain33
chain33-cli chain33-cli
tool
datadir*
*.log
*.exe
*.orig
*.bak
*.log.last
.idea
.vscode
build/chain33*
build/datadir
build/bityuan*
build/para
build/execblock
build/relayd
build/relayd.toml
build/*.log
build/fzm
build/guodun
build/main.sh
build/main*
build/para.sh
build/ci
build/tools/autotest/autotest
build/tools/autotest/*.toml
build/tools/autotest/chain33
build/tools/autotest/chain33-cli
.DS_Store
logs/
build/wallet
plugin/store/kvmvcc/1.png
plugin/store/kvmvcc/cpu.pprof
plugin/store/kvmvcc/kvmvcc.test
plugin/store/mpt/1.png
plugin/store/mpt/cpu.pprof
plugin/store/mpt/mpt.test
plugin/consensus/raft/tools/scripts/grpc33.log
plugin/consensus/raft/tools/scripts/logs/
...@@ -221,7 +221,6 @@ auto_ci: clean fmt_proto fmt_shell protobuf ...@@ -221,7 +221,6 @@ auto_ci: clean fmt_proto fmt_shell protobuf
${auto_fmt} ${auto_fmt}
git add *.go *.sh *.proto git add *.go *.sh *.proto
git status git status
echo "branch"
echo $(branch) echo $(branch)
files=$$(git status -suno); if [ -n "$$files" ]; then \ files=$$(git status -suno); if [ -n "$$files" ]; then \
git add *.go *.sh *.proto; \ git add *.go *.sh *.proto; \
......
...@@ -74,10 +74,14 @@ message BlackwhiteShow { ...@@ -74,10 +74,14 @@ message BlackwhiteShow {
string secret = 2; string secret = 2;
} }
message BlackwhiteTimeoutDone { string gameID = 1; } message BlackwhiteTimeoutDone {
string gameID = 1;
}
// logs // logs
message ReceiptBlackwhite { BlackwhiteRound round = 1; } message ReceiptBlackwhite {
BlackwhiteRound round = 1;
}
message ReceiptBlackwhiteStatus { message ReceiptBlackwhiteStatus {
string gameID = 1; string gameID = 1;
...@@ -88,9 +92,13 @@ message ReceiptBlackwhiteStatus { ...@@ -88,9 +92,13 @@ message ReceiptBlackwhiteStatus {
int64 index = 5; int64 index = 5;
} }
message ReqBlackwhiteRoundInfo { string gameID = 1; } message ReqBlackwhiteRoundInfo {
string gameID = 1;
}
message ReplyBlackwhiteRoundInfo { BlackwhiteRoundResult round = 1; } message ReplyBlackwhiteRoundInfo {
BlackwhiteRoundResult round = 1;
}
message ReqBlackwhiteRoundList { message ReqBlackwhiteRoundList {
//优先根据status查询,status不可为空 //优先根据status查询,status不可为空
...@@ -102,7 +110,9 @@ message ReqBlackwhiteRoundList { ...@@ -102,7 +110,9 @@ message ReqBlackwhiteRoundList {
int64 index = 5; int64 index = 5;
} }
message ReplyBlackwhiteRoundList { repeated BlackwhiteRoundResult round = 1; } message ReplyBlackwhiteRoundList {
repeated BlackwhiteRoundResult round = 1;
}
message ReqLoopResult { message ReqLoopResult {
string gameID = 1; string gameID = 1;
......
...@@ -89,7 +89,9 @@ message ReceiptEVMContractCmd { ...@@ -89,7 +89,9 @@ message ReceiptEVMContractCmd {
string ret = 5; string ret = 5;
} }
message CheckEVMAddrReq { string addr = 1; } message CheckEVMAddrReq {
string addr = 1;
}
message CheckEVMAddrResp { message CheckEVMAddrResp {
bool contract = 1; bool contract = 1;
string contractAddr = 2; string contractAddr = 2;
...@@ -103,11 +105,15 @@ message EstimateEVMGasReq { ...@@ -103,11 +105,15 @@ message EstimateEVMGasReq {
string caller = 3; string caller = 3;
uint64 amount = 4; uint64 amount = 4;
} }
message EstimateEVMGasResp { uint64 gas = 1; } message EstimateEVMGasResp {
uint64 gas = 1;
}
message EvmDebugReq { message EvmDebugReq {
// 0 query, 1 set, -1 clear // 0 query, 1 set, -1 clear
int32 optype = 1; int32 optype = 1;
} }
message EvmDebugResp { string debugStatus = 1; } message EvmDebugResp {
\ No newline at end of file string debugStatus = 1;
}
\ No newline at end of file
...@@ -59,7 +59,9 @@ message GameMatch { ...@@ -59,7 +59,9 @@ message GameMatch {
int32 guess = 2; int32 guess = 2;
} }
message GameCancel { string gameId = 1; } message GameCancel {
string gameId = 1;
}
message GameClose { message GameClose {
string gameId = 1; string gameId = 1;
...@@ -100,15 +102,25 @@ message GameRecord { ...@@ -100,15 +102,25 @@ message GameRecord {
int64 index = 2; int64 index = 2;
} }
message QueryGameInfo { string gameId = 1; } message QueryGameInfo {
string gameId = 1;
}
message QueryGameInfos { repeated string gameIds = 1; } message QueryGameInfos {
repeated string gameIds = 1;
}
message ReplyGameList { repeated Game games = 1; } message ReplyGameList {
repeated Game games = 1;
}
message ReplyGameListCount { int64 count = 1; } message ReplyGameListCount {
int64 count = 1;
}
message ReplyGame { Game game = 1; } message ReplyGame {
Game game = 1;
}
message ReceiptGame { message ReceiptGame {
string gameId = 1; string gameId = 1;
......
...@@ -35,7 +35,9 @@ message Lottery { ...@@ -35,7 +35,9 @@ message Lottery {
repeated MissingRecord missingRecords = 17; repeated MissingRecord missingRecords = 17;
} }
message MissingRecord { repeated int32 times = 1; } message MissingRecord {
repeated int32 times = 1;
}
message LotteryAction { message LotteryAction {
oneof value { oneof value {
...@@ -59,9 +61,13 @@ message LotteryBuy { ...@@ -59,9 +61,13 @@ message LotteryBuy {
int64 way = 4; int64 way = 4;
} }
message LotteryDraw { string lotteryId = 1; } message LotteryDraw {
string lotteryId = 1;
}
message LotteryClose { string lotteryId = 1; } message LotteryClose {
string lotteryId = 1;
}
message ReceiptLottery { message ReceiptLottery {
string lotteryId = 1; string lotteryId = 1;
...@@ -79,7 +85,9 @@ message ReceiptLottery { ...@@ -79,7 +85,9 @@ message ReceiptLottery {
int64 index = 13; int64 index = 13;
} }
message ReqLotteryInfo { string lotteryId = 1; } message ReqLotteryInfo {
string lotteryId = 1;
}
message ReqLotteryBuyInfo { message ReqLotteryBuyInfo {
string lotteryId = 1; string lotteryId = 1;
...@@ -130,9 +138,13 @@ message ReplyLotteryCurrentInfo { ...@@ -130,9 +138,13 @@ message ReplyLotteryCurrentInfo {
repeated MissingRecord missingRecords = 12; repeated MissingRecord missingRecords = 12;
} }
message ReplyLotteryHistoryLuckyNumber { repeated int64 luckyNumber = 1; } message ReplyLotteryHistoryLuckyNumber {
repeated int64 luckyNumber = 1;
}
message ReplyLotteryShowInfo { repeated LotteryBuyRecord records = 1; } message ReplyLotteryShowInfo {
repeated LotteryBuyRecord records = 1;
}
message LotteryNumberRecord { message LotteryNumberRecord {
int64 number = 1; int64 number = 1;
...@@ -151,7 +163,9 @@ message LotteryBuyRecord { ...@@ -151,7 +163,9 @@ message LotteryBuyRecord {
string txHash = 8; string txHash = 8;
} }
message LotteryBuyRecords { repeated LotteryBuyRecord records = 1; } message LotteryBuyRecords {
repeated LotteryBuyRecord records = 1;
}
message LotteryDrawRecord { message LotteryDrawRecord {
int64 number = 1; int64 number = 1;
...@@ -160,15 +174,23 @@ message LotteryDrawRecord { ...@@ -160,15 +174,23 @@ message LotteryDrawRecord {
string txHash = 4; string txHash = 4;
} }
message LotteryDrawRecords { repeated LotteryDrawRecord records = 1; } message LotteryDrawRecords {
repeated LotteryDrawRecord records = 1;
}
message LotteryUpdateRec { message LotteryUpdateRec {
int64 index = 1; int64 index = 1;
int64 type = 2; int64 type = 2;
} }
message LotteryUpdateRecs { repeated LotteryUpdateRec records = 1; } message LotteryUpdateRecs {
repeated LotteryUpdateRec records = 1;
}
message LotteryUpdateBuyInfo { map<string, LotteryUpdateRecs> buyInfo = 1; } message LotteryUpdateBuyInfo {
map<string, LotteryUpdateRecs> buyInfo = 1;
}
message ReplyLotteryPurchaseAddr { repeated string address = 1; } message ReplyLotteryPurchaseAddr {
repeated string address = 1;
}
...@@ -9,7 +9,9 @@ message Norm { ...@@ -9,7 +9,9 @@ message Norm {
} }
message NormAction { message NormAction {
oneof value { NormPut nput = 1; } oneof value {
NormPut nput = 1;
}
int32 ty = 5; int32 ty = 5;
} }
...@@ -18,4 +20,6 @@ message NormPut { ...@@ -18,4 +20,6 @@ message NormPut {
bytes value = 2; bytes value = 2;
} }
message NormGetKey { string key = 1; } message NormGetKey {
\ No newline at end of file string key = 1;
}
\ No newline at end of file
...@@ -42,9 +42,13 @@ message ParacrossNodeStatus { ...@@ -42,9 +42,13 @@ message ParacrossNodeStatus {
repeated bytes crossTxHashs = 13; repeated bytes crossTxHashs = 13;
} }
message ParacrossCommitAction { ParacrossNodeStatus status = 1; } message ParacrossCommitAction {
ParacrossNodeStatus status = 1;
}
message ParacrossMinerAction { ParacrossNodeStatus status = 1; } message ParacrossMinerAction {
ParacrossNodeStatus status = 1;
}
message ParacrossAction { message ParacrossAction {
oneof value { oneof value {
...@@ -67,7 +71,9 @@ message ReceiptParacrossCommit { ...@@ -67,7 +71,9 @@ message ReceiptParacrossCommit {
ParacrossHeightStatus current = 4; ParacrossHeightStatus current = 4;
} }
message ReceiptParacrossMiner { ParacrossNodeStatus status = 1; } message ReceiptParacrossMiner {
ParacrossNodeStatus status = 1;
}
message ReceiptParacrossDone { message ReceiptParacrossDone {
int32 totalNodes = 1; int32 totalNodes = 1;
...@@ -87,7 +93,9 @@ message ReceiptParacrossRecord { ...@@ -87,7 +93,9 @@ message ReceiptParacrossRecord {
// LocalDB // LocalDB
// title-height-addr : txHash // title-height-addr : txHash
message ParacrossTx { string txHash = 1; } message ParacrossTx {
string txHash = 1;
}
// query // query
message ReqParacrossTitleHeight { message ReqParacrossTitleHeight {
...@@ -95,7 +103,9 @@ message ReqParacrossTitleHeight { ...@@ -95,7 +103,9 @@ message ReqParacrossTitleHeight {
int64 height = 2; int64 height = 2;
} }
message RespParacrossTitles { repeated ReceiptParacrossDone titles = 1; } message RespParacrossTitles {
repeated ReceiptParacrossDone titles = 1;
}
// 跨链转账相关 // 跨链转账相关
message ParacrossAsset { message ParacrossAsset {
......
...@@ -74,13 +74,19 @@ message PBGameStart { ...@@ -74,13 +74,19 @@ message PBGameStart {
} }
//游戏继续 //游戏继续
message PBGameContinue { string gameId = 1; } message PBGameContinue {
string gameId = 1;
}
//游戏结束 //游戏结束
message PBGameQuit { string gameId = 1; } message PBGameQuit {
string gameId = 1;
}
//查询游戏结果 //查询游戏结果
message PBGameQuery { string gameId = 1; } message PBGameQuery {
string gameId = 1;
}
//根据状态和游戏人数查找 //根据状态和游戏人数查找
message QueryPBGameListByStatusAndPlayerNum { message QueryPBGameListByStatusAndPlayerNum {
...@@ -101,7 +107,9 @@ message PBGameIndexRecord { ...@@ -101,7 +107,9 @@ message PBGameIndexRecord {
int64 index = 2; int64 index = 2;
} }
message PBGameRecords { repeated PBGameRecord records = 1; } message PBGameRecords {
repeated PBGameRecord records = 1;
}
message QueryPBGameInfo { message QueryPBGameInfo {
string gameId = 1; string gameId = 1;
...@@ -110,11 +118,17 @@ message QueryPBGameInfo { ...@@ -110,11 +118,17 @@ message QueryPBGameInfo {
int64 index = 4; int64 index = 4;
} }
message ReplyPBGame { PokerBull game = 1; } message ReplyPBGame {
PokerBull game = 1;
}
message QueryPBGameInfos { repeated string gameIds = 1; } message QueryPBGameInfos {
repeated string gameIds = 1;
}
message ReplyPBGameList { repeated PokerBull games = 1; } message ReplyPBGameList {
repeated PokerBull games = 1;
}
message ReceiptPBGame { message ReceiptPBGame {
string gameId = 1; string gameId = 1;
......
...@@ -56,7 +56,9 @@ message KeyInput { ...@@ -56,7 +56,9 @@ message KeyInput {
bytes keyImage = 3; bytes keyImage = 3;
} }
message PrivacyInput { repeated KeyInput keyinput = 1; } message PrivacyInput {
repeated KeyInput keyinput = 1;
}
// privacy output // privacy output
message keyOutput { message keyOutput {
...@@ -88,7 +90,9 @@ message ReqUTXOPubKeys { ...@@ -88,7 +90,9 @@ message ReqUTXOPubKeys {
} }
// 一个公钥信息 // 一个公钥信息
message PublicKeyData { repeated bytes data = 1; } message PublicKeyData {
repeated bytes data = 1;
}
message GroupUTXOPubKey { message GroupUTXOPubKey {
int64 amount = 1; int64 amount = 1;
...@@ -96,7 +100,9 @@ message GroupUTXOPubKey { ...@@ -96,7 +100,9 @@ message GroupUTXOPubKey {
repeated bytes pubkey = 2; repeated bytes pubkey = 2;
} }
message ResUTXOPubKeys { repeated GroupUTXOPubKey groupUTXOPubKeys = 1; } message ResUTXOPubKeys {
repeated GroupUTXOPubKey groupUTXOPubKeys = 1;
}
message ReqPrivacyToken { message ReqPrivacyToken {
string token = 1; string token = 1;
...@@ -108,18 +114,26 @@ message AmountDetail { ...@@ -108,18 +114,26 @@ message AmountDetail {
int64 count = 2; int64 count = 2;
} }
message ReplyPrivacyAmounts { repeated AmountDetail amountDetail = 1; } message ReplyPrivacyAmounts {
repeated AmountDetail amountDetail = 1;
}
message replyUTXOsOfAmount { repeated LocalUTXOItem localUTXOItems = 1; } message replyUTXOsOfAmount {
repeated LocalUTXOItem localUTXOItems = 1;
}
message ReceiptPrivacyOutput { message ReceiptPrivacyOutput {
string token = 1; string token = 1;
repeated keyOutput keyoutput = 2; repeated keyOutput keyoutput = 2;
} }
//各种amount额度的UTXO在链上的数量 //各种amount额度的UTXO在链上的数量
message AmountsOfUTXO { map<int64, int64> amountMap = 1; } message AmountsOfUTXO {
map<int64, int64> amountMap = 1;
}
message TokenNamesOfUTXO { map<string, string> tokensMap = 1; } message TokenNamesOfUTXO {
map<string, string> tokensMap = 1;
}
// 用以转换成json后继续可见的结构 // 用以转换成json后继续可见的结构
message UTXOGlobalIndex4Print { message UTXOGlobalIndex4Print {
...@@ -138,7 +152,9 @@ message keyOutput4Print { ...@@ -138,7 +152,9 @@ message keyOutput4Print {
string onetimepubkey = 2; string onetimepubkey = 2;
} }
message PrivacyInput4Print { repeated KeyInput4Print keyinput = 1; } message PrivacyInput4Print {
repeated KeyInput4Print keyinput = 1;
}
message PrivacyOutput4Print { message PrivacyOutput4Print {
string RpubKeytx = 1; string RpubKeytx = 1;
...@@ -272,9 +288,13 @@ message UTXOHaveTxHash { ...@@ -272,9 +288,13 @@ message UTXOHaveTxHash {
UTXOBasic utxoBasic = 3; UTXOBasic utxoBasic = 3;
} }
message UTXOs { repeated UTXO utxos = 1; } message UTXOs {
repeated UTXO utxos = 1;
}
message UTXOHaveTxHashs { repeated UTXOHaveTxHash utxoHaveTxHashs = 1; } message UTXOHaveTxHashs {
repeated UTXOHaveTxHash utxoHaveTxHashs = 1;
}
message ReqUTXOGlobalIndex { message ReqUTXOGlobalIndex {
string tokenname = 1; string tokenname = 1;
...@@ -312,7 +332,9 @@ message RealKeyInput { ...@@ -312,7 +332,9 @@ message RealKeyInput {
bytes onetimeprivkey = 2; bytes onetimeprivkey = 2;
} }
message UTXOBasics { repeated UTXOBasic utxos = 1; } message UTXOBasics {
repeated UTXOBasic utxos = 1;
}
message CreateTransactionCache { message CreateTransactionCache {
bytes key = 1; bytes key = 1;
...@@ -338,7 +360,9 @@ message ReqCacheTxList { ...@@ -338,7 +360,9 @@ message ReqCacheTxList {
string tokenname = 2; string tokenname = 2;
} }
message ReplyCacheTxList { repeated Transaction txs = 1; } message ReplyCacheTxList {
repeated Transaction txs = 1;
}
message ReqPrivacyAccount { message ReqPrivacyAccount {
string tokenname = 1; string tokenname = 1;
...@@ -398,7 +422,9 @@ message RepRescanUtxos { ...@@ -398,7 +422,9 @@ message RepRescanUtxos {
repeated RepRescanResult repRescanResults = 2; repeated RepRescanResult repRescanResults = 2;
} }
message ReqEnablePrivacy { repeated string addrs = 2; } message ReqEnablePrivacy {
repeated string addrs = 2;
}
message PriAddrResult { message PriAddrResult {
string addr = 1; string addr = 1;
...@@ -406,7 +432,9 @@ message PriAddrResult { ...@@ -406,7 +432,9 @@ message PriAddrResult {
string msg = 3; string msg = 3;
} }
message RepEnablePrivacy { repeated PriAddrResult results = 1; } message RepEnablePrivacy {
repeated PriAddrResult results = 1;
}
// 隐私交易三步发送时,临时存储签名需要的数据信息结构 // 隐私交易三步发送时,临时存储签名需要的数据信息结构
message PrivacySignatureParam { message PrivacySignatureParam {
......
...@@ -104,7 +104,9 @@ message BtcHeader { ...@@ -104,7 +104,9 @@ message BtcHeader {
// head (may not from 1) // head (may not from 1)
} }
message BtcHeaders { repeated BtcHeader btcHeader = 1; } message BtcHeaders {
repeated BtcHeader btcHeader = 1;
}
message BtcTransaction { message BtcTransaction {
string hash = 1; // txhash string hash = 1; // txhash
...@@ -177,14 +179,18 @@ message ReqRelayAddrCoins { ...@@ -177,14 +179,18 @@ message ReqRelayAddrCoins {
int32 pageSize = 5; int32 pageSize = 5;
} }
message ReplyRelayOrders { repeated RelayOrder relayorders = 1; } message ReplyRelayOrders {
repeated RelayOrder relayorders = 1;
}
message QueryRelayOrderParam { message QueryRelayOrderParam {
RelayOrderStatus status = 1; RelayOrderStatus status = 1;
string orderId = 2; string orderId = 2;
} }
message QueryRelayOrderResult { repeated RelayOrder orders = 1; } message QueryRelayOrderResult {
repeated RelayOrder orders = 1;
}
message ReqRelayBtcHeaderHeightList { message ReqRelayBtcHeaderHeightList {
int64 reqHeight = 1; int64 reqHeight = 1;
...@@ -192,7 +198,9 @@ message ReqRelayBtcHeaderHeightList { ...@@ -192,7 +198,9 @@ message ReqRelayBtcHeaderHeightList {
int32 direction = 3; // 0: desc, 1: asc int32 direction = 3; // 0: desc, 1: asc
} }
message ReplyRelayBtcHeadHeightList { repeated int64 heights = 1; } message ReplyRelayBtcHeadHeightList {
repeated int64 heights = 1;
}
message ReqRelayQryBTCHeadHeight { message ReqRelayQryBTCHeadHeight {
int64 baseHeight = 1; // from the baseHeight begin, if any int64 baseHeight = 1; // from the baseHeight begin, if any
......
...@@ -77,16 +77,22 @@ message TicketGenesis { ...@@ -77,16 +77,22 @@ message TicketGenesis {
int32 count = 3; int32 count = 3;
} }
message TicketClose { repeated string ticketId = 1; } message TicketClose {
repeated string ticketId = 1;
}
message TicketList { message TicketList {
string addr = 1; string addr = 1;
int32 status = 3; int32 status = 3;
} }
message TicketInfos { repeated string ticketIds = 1; } message TicketInfos {
repeated string ticketIds = 1;
}
message ReplyTicketList { repeated Ticket tickets = 1; } message ReplyTicketList {
repeated Ticket tickets = 1;
}
message ReplyWalletTickets { message ReplyWalletTickets {
repeated Ticket tickets = 1; repeated Ticket tickets = 1;
...@@ -113,7 +119,9 @@ message ReqBindMiner { ...@@ -113,7 +119,9 @@ message ReqBindMiner {
bool checkBalance = 4; bool checkBalance = 4;
} }
message ReplyBindMiner { string txHex = 1; } message ReplyBindMiner {
string txHex = 1;
}
service ticket { service ticket {
//创建绑定挖矿 //创建绑定挖矿
......
...@@ -87,13 +87,17 @@ message ReqTokens { ...@@ -87,13 +87,17 @@ message ReqTokens {
bool symbolOnly = 4; bool symbolOnly = 4;
} }
message ReplyTokens { repeated LocalToken tokens = 1; } message ReplyTokens {
repeated LocalToken tokens = 1;
}
message TokenRecv { message TokenRecv {
string token = 1; string token = 1;
int64 recv = 2; int64 recv = 2;
} }
message ReplyAddrRecvForTokens { repeated TokenRecv tokenRecvs = 1; } message ReplyAddrRecvForTokens {
repeated TokenRecv tokenRecvs = 1;
}
message ReqTokenBalance { message ReqTokenBalance {
repeated string addresses = 1; repeated string addresses = 1;
...@@ -111,7 +115,9 @@ message TokenAsset { ...@@ -111,7 +115,9 @@ message TokenAsset {
Account account = 2; Account account = 2;
} }
message ReplyAccountTokenAssets { repeated TokenAsset tokenAssets = 1; } message ReplyAccountTokenAssets {
repeated TokenAsset tokenAssets = 1;
}
message ReqAddrTokens { message ReqAddrTokens {
string addr = 1; string addr = 1;
......
...@@ -44,7 +44,9 @@ message TradeForBuy { ...@@ -44,7 +44,9 @@ message TradeForBuy {
} }
// 允许token的持有者撤销之前未成交出售token的挂单 // 允许token的持有者撤销之前未成交出售token的挂单
message TradeForRevokeSell { string sellID = 1; } message TradeForRevokeSell {
string sellID = 1;
}
// 限价买单构造请求 // 限价买单构造请求
message TradeForBuyLimit { message TradeForBuyLimit {
...@@ -63,7 +65,9 @@ message TradeForSellMarket { ...@@ -63,7 +65,9 @@ message TradeForSellMarket {
} }
// 撤销买单 // 撤销买单
message TradeForRevokeBuy { string buyID = 1; } message TradeForRevokeBuy {
string buyID = 1;
}
// 数据库部分 // 数据库部分
message SellOrder { message SellOrder {
...@@ -143,17 +147,29 @@ message ReceiptSellBase { ...@@ -143,17 +147,29 @@ message ReceiptSellBase {
string assetExec = 16; string assetExec = 16;
} }
message ReceiptTradeBuyMarket { ReceiptBuyBase base = 1; } message ReceiptTradeBuyMarket {
ReceiptBuyBase base = 1;
}
message ReceiptTradeBuyLimit { ReceiptBuyBase base = 1; } message ReceiptTradeBuyLimit {
ReceiptBuyBase base = 1;
}
message ReceiptTradeBuyRevoke { ReceiptBuyBase base = 1; } message ReceiptTradeBuyRevoke {
ReceiptBuyBase base = 1;
}
message ReceiptTradeSellLimit { ReceiptSellBase base = 1; } message ReceiptTradeSellLimit {
ReceiptSellBase base = 1;
}
message ReceiptSellMarket { ReceiptSellBase base = 1; } message ReceiptSellMarket {
ReceiptSellBase base = 1;
}
message ReceiptTradeSellRevoke { ReceiptSellBase base = 1; } message ReceiptTradeSellRevoke {
ReceiptSellBase base = 1;
}
// 查询部分 // 查询部分
...@@ -222,9 +238,13 @@ message ReplySellOrder { ...@@ -222,9 +238,13 @@ message ReplySellOrder {
string assetExec = 14; string assetExec = 14;
} }
message ReplySellOrders { repeated ReplySellOrder sellOrders = 1; } message ReplySellOrders {
repeated ReplySellOrder sellOrders = 1;
}
message ReplyBuyOrders { repeated ReplyBuyOrder buyOrders = 1; } message ReplyBuyOrders {
repeated ReplyBuyOrder buyOrders = 1;
}
message ReplyTradeOrder { message ReplyTradeOrder {
string tokenSymbol = 1; string tokenSymbol = 1;
...@@ -245,7 +265,9 @@ message ReplyTradeOrder { ...@@ -245,7 +265,9 @@ message ReplyTradeOrder {
string assetExec = 16; string assetExec = 16;
} }
message ReplyTradeOrders { repeated ReplyTradeOrder orders = 1; } message ReplyTradeOrders {
repeated ReplyTradeOrder orders = 1;
}
message ReqSellToken { message ReqSellToken {
TradeForSell sell = 1; TradeForSell sell = 1;
......
...@@ -4,7 +4,9 @@ import "transaction.proto"; ...@@ -4,7 +4,9 @@ import "transaction.proto";
package types; package types;
message BlockID { bytes Hash = 1; } message BlockID {
bytes Hash = 1;
}
message TendermintBitArray { message TendermintBitArray {
int32 Bits = 1; int32 Bits = 1;
...@@ -46,9 +48,13 @@ message TxSize { ...@@ -46,9 +48,13 @@ message TxSize {
int64 MaxGas = 2; int64 MaxGas = 2;
} }
message BlockGossip { int32 BlockPartSizeBytes = 1; } message BlockGossip {
int32 BlockPartSizeBytes = 1;
}
message EvidenceParams { int64 MaxAge = 1; } message EvidenceParams {
int64 MaxAge = 1;
}
message ConsensusParams { message ConsensusParams {
BlockSize BlockSize = 1; BlockSize BlockSize = 1;
TxSize TxSize = 2; TxSize TxSize = 2;
...@@ -94,7 +100,9 @@ message EvidenceEnvelope { ...@@ -94,7 +100,9 @@ message EvidenceEnvelope {
bytes data = 2; bytes data = 2;
} }
message EvidenceData { repeated EvidenceEnvelope evidence = 1; } message EvidenceData {
repeated EvidenceEnvelope evidence = 1;
}
message TendermintBlockHeader { message TendermintBlockHeader {
string chainID = 1; string chainID = 1;
...@@ -138,7 +146,9 @@ message NewRoundStepMsg { ...@@ -138,7 +146,9 @@ message NewRoundStepMsg {
int32 lastCommitRound = 5; int32 lastCommitRound = 5;
} }
message CommitStepMsg { int64 height = 1; } message CommitStepMsg {
int64 height = 1;
}
message ProposalPOLMsg { message ProposalPOLMsg {
int64 height = 1; int64 height = 1;
......
...@@ -8,7 +8,9 @@ message ValNode { ...@@ -8,7 +8,9 @@ message ValNode {
int64 power = 2; int64 power = 2;
} }
message ValNodes { repeated ValNode nodes = 1; } message ValNodes {
repeated ValNode nodes = 1;
}
message ValNodeAction { message ValNodeAction {
oneof value { oneof value {
...@@ -18,6 +20,10 @@ message ValNodeAction { ...@@ -18,6 +20,10 @@ message ValNodeAction {
int32 Ty = 3; int32 Ty = 3;
} }
message ReqNodeInfo { int64 height = 1; } message ReqNodeInfo {
int64 height = 1;
}
message ReqBlockInfo { int64 height = 1; } message ReqBlockInfo {
\ No newline at end of file int64 height = 1;
}
\ No newline at end of file
...@@ -13,13 +13,19 @@ message Node { ...@@ -13,13 +13,19 @@ message Node {
int32 index = 6; int32 index = 6;
} }
message FullNode { repeated Node nodes = 1; } message FullNode {
repeated Node nodes = 1;
}
message ShortNode { message ShortNode {
bytes key = 1; bytes key = 1;
Node val = 2; Node val = 2;
} }
message HashNode { bytes hash = 1; } message HashNode {
bytes hash = 1;
}
message ValueNode { bytes value = 1; } message ValueNode {
bytes value = 1;
}
package mpt package mpt
import ( import (
lru "github.com/hashicorp/golang-lru"
"gitlab.33.cn/chain33/chain33/common" "gitlab.33.cn/chain33/chain33/common"
clog "gitlab.33.cn/chain33/chain33/common/log" clog "gitlab.33.cn/chain33/chain33/common/log"
log "gitlab.33.cn/chain33/chain33/common/log/log15" log "gitlab.33.cn/chain33/chain33/common/log/log15"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment