Skip to content

Commit

Permalink
[Spork] fix CSporkManager maps
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Sep 23, 2019
1 parent 3ec2f61 commit 3df34c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/spork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void CSporkManager::ProcessSpork(CNode* pfrom, std::string& strCommand, CDataStr
}
if (strCommand == "getsporks") {
LOCK(cs);
std::map<int, CSporkMessage>::iterator it = mapSporksActive.begin();
std::map<SporkId, CSporkMessage>::iterator it = mapSporksActive.begin();

while (it != mapSporksActive.end()) {
pfrom->PushMessage("spork", it->second);
Expand Down
8 changes: 3 additions & 5 deletions src/spork.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#ifndef SPORK_H
#define SPORK_H

#include <unordered_map>

#include "base58.h"
#include "hash.h"
#include "key.h"
Expand Down Expand Up @@ -68,9 +66,9 @@ class CSporkManager
private:
mutable CCriticalSection cs;
std::string strMasterPrivKey;
std::unordered_map<SporkId, CSporkDef*> sporkDefsById;
std::unordered_map<std::string, CSporkDef*> sporkDefsByName;
std::map<int, CSporkMessage> mapSporksActive;
std::map<SporkId, CSporkDef*> sporkDefsById;
std::map<std::string, CSporkDef*> sporkDefsByName;
std::map<SporkId, CSporkMessage> mapSporksActive;

public:
CSporkManager();
Expand Down

0 comments on commit 3df34c6

Please sign in to comment.