mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Small cleanups/fixes.
This commit is contained in:
@@ -22,7 +22,7 @@ void ConnectionPool::connectToNetwork(KnownNodeList& nodeList,boost::asio::io_se
|
|||||||
if(!node) return;
|
if(!node) return;
|
||||||
|
|
||||||
Peer::pointer peer=Peer::create(io_service);
|
Peer::pointer peer=Peer::create(io_service);
|
||||||
peer->connectTo(*node);
|
// peer->connectTo(*node); // FIXME
|
||||||
mPeers.push_back(peer);
|
mPeers.push_back(peer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
3
Issues
3
Issues
@@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
Issues we know about but have not resolved yet:
|
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
|
filtering proxy and prevent us from making many connections to the same
|
||||||
node.
|
node.
|
||||||
|
|
||||||
We need a maximum message size.
|
We need a maximum message size.
|
||||||
|
|
||||||
|
|||||||
12
Ledger.h
12
Ledger.h
@@ -1,6 +1,12 @@
|
|||||||
#ifndef __LEDGER__
|
#ifndef __LEDGER__
|
||||||
#define __LEDGER__
|
#define __LEDGER__
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
#include <list>
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <boost/enable_shared_from_this.hpp>
|
||||||
|
|
||||||
#include "Transaction.h"
|
#include "Transaction.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "BitcoinUtil.h"
|
#include "BitcoinUtil.h"
|
||||||
@@ -8,12 +14,6 @@
|
|||||||
#include "AccountState.h"
|
#include "AccountState.h"
|
||||||
#include "SHAMap.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>
|
class Ledger : public boost::enable_shared_from_this<Ledger>
|
||||||
{ // The basic Ledger structure, can be opened, closed, or synching
|
{ // The basic Ledger structure, can be opened, closed, or synching
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "boost/thread/mutex.hpp"
|
#include <boost/thread/mutex.hpp>
|
||||||
|
|
||||||
#include "uint256.h"
|
#include "uint256.h"
|
||||||
#include "key.h"
|
#include "key.h"
|
||||||
|
|||||||
@@ -183,16 +183,19 @@ Json::Value RPCServer::doAccountInfo(Json::Value ¶ms)
|
|||||||
|
|
||||||
Json::Value RPCServer::doNewAccount(Json::Value ¶ms)
|
Json::Value RPCServer::doNewAccount(Json::Value ¶ms)
|
||||||
{ // newaccount <family>
|
{ // newaccount <family>
|
||||||
|
return "Not yet";
|
||||||
}
|
}
|
||||||
|
|
||||||
Json::Value RPCServer::doLock(Json::Value ¶ms)
|
Json::Value RPCServer::doLock(Json::Value ¶ms)
|
||||||
{ // lock <family>
|
{ // lock <family>
|
||||||
// lock
|
// lock
|
||||||
|
return "Not yet";
|
||||||
}
|
}
|
||||||
|
|
||||||
Json::Value RPCServer::doUnlock(Json::Value ¶ms)
|
Json::Value RPCServer::doUnlock(Json::Value ¶ms)
|
||||||
{ // unlock <hexPrivateKey>
|
{ // unlock <hexPrivateKey>
|
||||||
// unlock "<pass phrase>"
|
// unlock "<pass phrase>"
|
||||||
|
return "Not yet";
|
||||||
}
|
}
|
||||||
|
|
||||||
Json::Value RPCServer::doFamilyInfo(Json::Value ¶ms)
|
Json::Value RPCServer::doFamilyInfo(Json::Value ¶ms)
|
||||||
@@ -290,6 +293,7 @@ Json::Value RPCServer::doSendTo(Json::Value& params)
|
|||||||
{ // Implement simple sending without gathering
|
{ // Implement simple sending without gathering
|
||||||
// sendto <destination> <amount>
|
// sendto <destination> <amount>
|
||||||
// sendto <destination> <amount> <tag>
|
// sendto <destination> <amount> <tag>
|
||||||
|
return "Not yet";
|
||||||
}
|
}
|
||||||
|
|
||||||
Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params)
|
Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params)
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ void UniqueNodeList::dumpUNL(std::string& retStr)
|
|||||||
while(db->getNextRow())
|
while(db->getNextRow())
|
||||||
{
|
{
|
||||||
uint160 hanko;
|
uint160 hanko;
|
||||||
int size=db->getBinary("Hanko", hanko.begin(), hanko.GetSerializeSize());
|
db->getBinary("Hanko", hanko.begin(), hanko.GetSerializeSize());
|
||||||
std::string tstr;
|
std::string tstr;
|
||||||
u160ToHuman(hanko, tstr);
|
u160ToHuman(hanko, tstr);
|
||||||
|
|
||||||
|
|||||||
5
rpc.cpp
5
rpc.cpp
@@ -229,10 +229,7 @@ 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)
|
std::string JSONRPCReply(const Json::Value& result, const Json::Value& error, const Json::Value& id)
|
||||||
{
|
{
|
||||||
Json::Value reply;
|
Json::Value reply(Json::objectValue);
|
||||||
if (!error.isNull())
|
|
||||||
reply["result"]=Json::Value();
|
|
||||||
else
|
|
||||||
reply["result"]=result;
|
reply["result"]=result;
|
||||||
reply["error"]=error;
|
reply["error"]=error;
|
||||||
reply["id"]=id;
|
reply["id"]=id;
|
||||||
|
|||||||
Reference in New Issue
Block a user