From e724dcbee88dc254e2230ec29fb40ba7afe52e36 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 19 Jul 2012 08:31:27 -0700 Subject: [PATCH 1/2] An ugly temporary fix to handling integers in the RPC parameters. --- json/json_value.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/json/json_value.cpp b/json/json_value.cpp index f418af26d0..41d98787f6 100644 --- a/json/json_value.cpp +++ b/json/json_value.cpp @@ -9,6 +9,9 @@ # include #endif #include // size_t + +#include + #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR # include "json_batchallocator.h" #endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR @@ -693,6 +696,7 @@ Value::asString() const case booleanValue: return value_.bool_ ? "true" : "false"; case intValue: + return boost::lexical_cast(value_.int_); case uintValue: case realValue: case arrayValue: From fadca2cb97e1cf27c5b341cda8a3d7b785d21cfa Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 19 Jul 2012 08:32:23 -0700 Subject: [PATCH 2/2] Mark the problem. --- src/NetworkOPs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/NetworkOPs.h b/src/NetworkOPs.h index bf9aede3b9..12260b0e45 100644 --- a/src/NetworkOPs.h +++ b/src/NetworkOPs.h @@ -97,6 +97,8 @@ public: uint256 getClosedLedger() { return mLedgerMaster->getClosedLedger()->getHash(); } + // FIXME: This function is basically useless since the hash is constantly changing and the ledger + // is ephemeral and mutable. uint256 getCurrentLedger() { return mLedgerMaster->getCurrentLedger()->getHash(); }