Small cleanups/fixes.

This commit is contained in:
JoelKatz
2012-01-05 16:54:55 -08:00
parent c1213b20c6
commit 2e3a48dcea
8 changed files with 18 additions and 16 deletions

View File

@@ -22,7 +22,7 @@ void ConnectionPool::connectToNetwork(KnownNodeList& nodeList,boost::asio::io_se
if(!node) return;
Peer::pointer peer=Peer::create(io_service);
peer->connectTo(*node);
// peer->connectTo(*node); // FIXME
mPeers.push_back(peer);
}

3
Issues
View File

@@ -1,8 +1,9 @@
Issues we know about but have not resolved yet:
Generate/send session key , sign TCP parameters. This will prevent a
Generate/send session key, sign TCP parameters. This will prevent a
filtering proxy and prevent us from making many connections to the same
node.
We need a maximum message size.

View File

@@ -1,6 +1,12 @@
#ifndef __LEDGER__
#define __LEDGER__
#include <map>
#include <list>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include "Transaction.h"
#include "types.h"
#include "BitcoinUtil.h"
@@ -8,12 +14,6 @@
#include "AccountState.h"
#include "SHAMap.h"
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <map>
#include <list>
class Ledger : public boost::enable_shared_from_this<Ledger>
{ // The basic Ledger structure, can be opened, closed, or synching

View File

@@ -3,7 +3,7 @@
#include <map>
#include "boost/thread/mutex.hpp"
#include <boost/thread/mutex.hpp>
#include "uint256.h"
#include "key.h"

View File

@@ -183,16 +183,19 @@ Json::Value RPCServer::doAccountInfo(Json::Value &params)
Json::Value RPCServer::doNewAccount(Json::Value &params)
{ // newaccount <family>
return "Not yet";
}
Json::Value RPCServer::doLock(Json::Value &params)
{ // lock <family>
// lock
return "Not yet";
}
Json::Value RPCServer::doUnlock(Json::Value &params)
{ // unlock <hexPrivateKey>
// unlock "<pass phrase>"
return "Not yet";
}
Json::Value RPCServer::doFamilyInfo(Json::Value &params)
@@ -290,6 +293,7 @@ Json::Value RPCServer::doSendTo(Json::Value& params)
{ // Implement simple sending without gathering
// sendto <destination> <amount>
// sendto <destination> <amount> <tag>
return "Not yet";
}
Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params)

View File

@@ -36,7 +36,7 @@ class RPCServer : public boost::enable_shared_from_this<RPCServer>
Json::Value doLock(Json::Value& params);
Json::Value doUnlock(Json::Value& params);
Json::Value doSendTo(Json::Value& params);
public:
typedef boost::shared_ptr<RPCServer> pointer;

View File

@@ -69,7 +69,7 @@ void UniqueNodeList::dumpUNL(std::string& retStr)
while(db->getNextRow())
{
uint160 hanko;
int size=db->getBinary("Hanko", hanko.begin(), hanko.GetSerializeSize());
db->getBinary("Hanko", hanko.begin(), hanko.GetSerializeSize());
std::string tstr;
u160ToHuman(hanko, tstr);

View File

@@ -229,11 +229,8 @@ std::string JSONRPCRequest(const std::string& strMethod, const Json::Value& para
std::string JSONRPCReply(const Json::Value& result, const Json::Value& error, const Json::Value& id)
{
Json::Value reply;
if (!error.isNull())
reply["result"]=Json::Value();
else
reply["result"]=result;
Json::Value reply(Json::objectValue);
reply["result"]=result;
reply["error"]=error;
reply["id"]=id;
Json::FastWriter writer;