mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Round out node private key functionality.
This commit is contained in:
@@ -141,6 +141,20 @@ void NewcoinAddress::setNodePublic(const std::vector<unsigned char>& vPublic)
|
||||
// NodePrivate
|
||||
//
|
||||
|
||||
const std::vector<unsigned char>& NewcoinAddress::getNodePrivateData() const
|
||||
{
|
||||
switch (nVersion) {
|
||||
case VER_NONE:
|
||||
throw std::runtime_error("unset source");
|
||||
|
||||
case VER_NODE_PRIVATE:
|
||||
return vchData;
|
||||
|
||||
default:
|
||||
throw std::runtime_error(str(boost::format("bad source: %d") % int(nVersion)));
|
||||
}
|
||||
}
|
||||
|
||||
uint256 NewcoinAddress::getNodePrivate() const
|
||||
{
|
||||
switch (nVersion) {
|
||||
|
||||
Reference in New Issue
Block a user