Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/proofbuilder.cpp
// Copyright (c) 2020 The Bitcoin developers | // Copyright (c) 2020 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <avalanche/proofbuilder.h> | #include <avalanche/proofbuilder.h> | ||||
#include <random.h> | #include <random.h> | ||||
#include <util/system.h> | |||||
namespace avalanche { | namespace avalanche { | ||||
SignedStake ProofBuilder::StakeSigner::sign(const StakeCommitment &commitment) { | SignedStake ProofBuilder::StakeSigner::sign(const StakeCommitment &commitment) { | ||||
const uint256 h = stake.getHash(commitment); | const uint256 h = stake.getHash(commitment); | ||||
SchnorrSig sig; | SchnorrSig sig; | ||||
if (!key.SignSchnorr(h, sig)) { | if (!key.SignSchnorr(h, sig)) { | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |