Remove "closed" from getLedger response

This commit is contained in:
Chris Clark
2015-11-16 10:54:53 -08:00
parent ff9474b2f9
commit 230a80852a
9 changed files with 3 additions and 15 deletions

View File

@@ -3,10 +3,6 @@
"title": "getLedger",
"type": "object",
"properties": {
"closed": {
"type": "boolean",
"description": "Whether or not this ledger has been closed. This should always be true."
},
"stateHash": {
"$ref": "hash256",
"description": "Hash of all state information in this ledger."
@@ -83,7 +79,6 @@
}
},
"required": [
"closed",
"stateHash",
"closeTime",
"closeTimeResolution",

View File

@@ -47,7 +47,7 @@
]
},
"walletLocator": {
"description": "Not used.",
"description": "Hash of wallet in content-addressable storage (CAS) in the Ripple Consensus Ledger (not implemented yet). Use `null` to delete.",
"oneOf": [
{"type": "null"},
{"$ref": "hash256"}
@@ -55,7 +55,7 @@
},
"walletSize": {
"type": ["integer", "null"],
"description": "Not used."
"description": "Size of wallet in content-addressable storage (CAS) in the Ripple Consensus Ledger (not implemeneted yet). Use `null` to delete."
},
"messageKey": {
"type": "string",

View File

@@ -4,7 +4,7 @@ const BigNumber = require('bignumber.js');
const AccountFields = require('./utils').constants.AccountFields;
function parseField(info, value) {
if (info.encoding === 'hex' && !info.length) {
if (info.encoding === 'hex' && !info.length) { // e.g. "domain"
return new Buffer(value, 'hex').toString('ascii');
}
if (info.shift) {

View File

@@ -42,7 +42,6 @@ function parseState(state) {
function parseLedger(ledger: Object): GetLedger {
const ledgerVersion = parseInt(ledger.ledger_index || ledger.seqNum, 10);
return removeUndefined(_.assign({
closed: ledger.closed,
stateHash: ledger.account_hash,
closeTime: rippleTimeToISO8601(ledger.close_time),
closeTimeResolution: ledger.close_time_resolution,

View File

@@ -6,8 +6,6 @@ const hashes = require('ripple-hashes');
function convertLedgerHeader(header) {
return {
accepted: header.accepted,
closed: header.closed,
account_hash: header.stateHash,
close_time: common.iso8601ToRippleTime(header.closeTime),
close_time_resolution: header.closeTimeResolution,

View File

@@ -4,7 +4,6 @@
"parentCloseTime": "2015-08-12T01:01:00.000Z",
"closeFlags": 0,
"closeTimeResolution": 10,
"closed": true,
"ledgerVersion": 15202439,
"parentLedgerHash": "12724A65B030C15A1573AA28B1BBB5DF3DA4589AA3623675A31CAE69B23B1C4E",
"totalDrops": "99998831688050493",

View File

@@ -1,5 +1,4 @@
{
"closed": true,
"stateHash": "2C23D15B6B549123FB351E4B5CDE81C564318EB845449CD43C3EA7953C4DB452",
"closeTime": "2013-01-02T06:43:20.000Z",
"closeFlags": 0,

View File

@@ -1,5 +1,4 @@
{
"closed": true,
"stateHash": "2FC964BBFE22DF77A132FE12B5D2B58A09226EBCA73EF2CFF5BE29E56B3315F5",
"closeTime": "2014-01-01T00:03:30.000Z",
"closeTimeResolution": 10,

View File

@@ -1,5 +1,4 @@
{
"closed": true,
"stateHash": "EC028EC32896D537ECCA18D18BEBE6AE99709FEFF9EF72DBD3A7819E918D8B96",
"closeTime": "2014-09-24T21:21:50.000Z",
"closeTimeResolution": 10,