Skip to content

Commit

Permalink
Merge pull request #85 from Warchant/hotfix/fix-make-warnings
Browse files Browse the repository at this point in the history
Fixed warnings during make
  • Loading branch information
takemiyamakoto committed Dec 15, 2016
2 parents b50117c + 3b85a09 commit 2d981f0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ build/*
.vscode/*
.idea/*
*xcworkspace*
.vscode/*
2 changes: 1 addition & 1 deletion core/consensus/consensus_event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class ConsensusEvent: public T, public Event {
return T::getHash();
}

int getNumValidSignatures() {
unsigned int getNumValidSignatures() {
return std::count_if(
_eventSignatures.begin(), _eventSignatures.end(),
[hash = getHash()](eventSignature sig){
Expand Down
2 changes: 1 addition & 1 deletion core/consensus/event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Event {
public:
int order = 0;
virtual void addSignature(const std::string& publicKey, const std::string& signature) = 0;
virtual int getNumValidSignatures() = 0;
virtual unsigned int getNumValidSignatures() = 0;
virtual bool eventSignatureIsEmpty() = 0;
virtual std::vector<std::tuple<std::string,std::string>> eventSignatures() = 0;
virtual std::string getHash() = 0;
Expand Down
16 changes: 8 additions & 8 deletions core/model/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace transaction{
Transfer(
obj.dictSub["command"]
),
senderPubkey(obj.dictSub["senderPublicKey"].str),
hash(obj.dictSub["hash"].str)
hash(obj.dictSub["hash"].str),
senderPubkey(obj.dictSub["senderPublicKey"].str)
{

std::vector<Object> txSigs = obj.dictSub["txSignatures"].listSub;
Expand Down Expand Up @@ -62,13 +62,13 @@ namespace transaction{
const std::string& name,
const int& value
):
senderPubkey(senderPubkey),
Transfer(
senderPubkey,
receiverPubkey,
name,
value
)
),
senderPubkey(senderPubkey)
{}

template <>
Expand All @@ -79,13 +79,13 @@ namespace transaction{
const unsigned long long& value,
const unsigned int& precision
):
senderPubkey(senderPubkey),
Add(
domain,
name,
value,
precision
)
),
senderPubkey(senderPubkey)
{}

template <>
Expand All @@ -94,11 +94,11 @@ namespace transaction{
const std::string& ownerPublicKey,
const std::string& name
):
senderPubkey(senderPubkey),
Add(
ownerPublicKey,
name
)
),
senderPubkey(senderPubkey)
{}

}
6 changes: 3 additions & 3 deletions core/repository/consensus/merkle_transaction_repository.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ struct MerkleNode {

//TODO: change bool to throw an exception instead
bool commit(const std::unique_ptr<event::Event>& event){

return false; // TODO: fill this function
};

bool leafExists(const std::string& hash){

return false; // TODO: fill this function
}

std::string getLeaf(const std::string& hash){

return ""; // TODO: fill this function
}

template <typename T>
Expand Down

0 comments on commit 2d981f0

Please sign in to comment.