feat: add offset param to GetRecentBlocks

This commit is contained in:
Nex Zhu 2021-09-09 09:08:49 +08:00
parent 0d8ac0a76d
commit 94743e9a17
No known key found for this signature in database
GPG Key ID: 15C6254AD19362B4
4 changed files with 29 additions and 11 deletions

View File

@ -91,6 +91,7 @@
"parameters": [
{
"name": "ledger",
"description": "Ledger name\n账本名称",
"in": "path",
"required": true,
"type": "string"
@ -115,7 +116,8 @@
"type": "object",
"properties": {
"name": {
"type": "string"
"type": "string",
"title": "Ledger name\n账本名称"
}
}
},
@ -123,7 +125,8 @@
"type": "object",
"properties": {
"ok": {
"type": "boolean"
"type": "boolean",
"title": "Boolean value indicating if the ledger is successfully created\n是否创建成功"
}
}
},
@ -134,7 +137,8 @@
"type": "array",
"items": {
"type": "string"
}
},
"title": "List of ledger names\n帐本名称列表"
}
}
},
@ -142,10 +146,12 @@
"type": "object",
"properties": {
"ledger": {
"type": "string"
"type": "string",
"title": "Ledger name\n账本名称"
},
"transaction": {
"$ref": "#/definitions/apiSendTransactionRequestTransaction"
"$ref": "#/definitions/apiSendTransactionRequestTransaction",
"title": "Transaction info\n事务信息"
}
}
},
@ -178,7 +184,8 @@
"properties": {
"hash": {
"type": "string",
"format": "byte"
"format": "byte",
"title": "Hash of the created transaction\n事务哈希"
}
}
},

View File

@ -45,7 +45,8 @@
"type": "object",
"properties": {
"version": {
"type": "string"
"type": "string",
"title": "Client version\n节点客户端版本"
}
}
},

View File

@ -208,6 +208,13 @@
"required": true,
"type": "string"
},
{
"name": "offset",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "count",
"in": "query",
@ -422,7 +429,8 @@
"type": "string",
"format": "int64"
}
}
},
"title": "*\n暂不支持"
},
"apiBlocksRequest": {
"type": "object",
@ -552,7 +560,8 @@
"HASH",
"FULL"
],
"default": "NONE"
"default": "NONE",
"title": "*\n包含事务信息详细程度"
},
"apiTransactionFilter": {
"type": "object",

View File

@ -122,8 +122,9 @@ message CountBlocksResponse {
message RecentBlocksRequest {
string ledger = 1; //
int64 count = 2; //
IncludeTransactions include_transactions = 3; //
int64 offset = 2; //
int64 count = 3; //
IncludeTransactions include_transactions = 4; //
}
message GetTransactionByHashRequest {