-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathaddressbook.cpp
More file actions
39 lines (30 loc) · 1.22 KB
/
addressbook.cpp
File metadata and controls
39 lines (30 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) 2019 The PIVX developers
// Copyright (c) 2020 The CLEARCOIN developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "addressbook.h"
#include <string>
namespace AddressBook {
namespace AddressBookPurpose {
const std::string UNKNOWN{"unknown"};
const std::string RECEIVE{"receive"};
const std::string SEND{"send"};
const std::string DELEGABLE{"delegable"};
const std::string DELEGATOR{"delegator"};
const std::string COLD_STAKING{"coldstaking"};
const std::string COLD_STAKING_SEND{"coldstaking_send"};
}
bool IsColdStakingPurpose(const std::string& purpose) {
return purpose == AddressBookPurpose::COLD_STAKING
|| purpose == AddressBookPurpose::COLD_STAKING_SEND;
}
bool CAddressBookData::isSendColdStakingPurpose() const {
return purpose == AddressBookPurpose::COLD_STAKING_SEND;
}
bool CAddressBookData::isSendPurpose() const {
return purpose == AddressBookPurpose::SEND;
}
bool CAddressBookData::isReceivePurpose() const {
return purpose == AddressBookPurpose::RECEIVE;
}
}