Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: stop interactive only address from being used in mining #6544

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion base_layer/core/src/transactions/coinbase_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
use log::*;
use tari_common_types::{
key_branches::TransactionKeyManagerBranch,
tari_address::TariAddress,
tari_address::{TariAddress, TariAddressFeatures},
types::{Commitment, PrivateKey},
};
use tari_key_manager::key_manager_service::{KeyManagerInterface, KeyManagerServiceError};
Expand Down Expand Up @@ -435,6 +435,14 @@ pub async fn generate_coinbase_with_wallet_output(
range_proof_type: RangeProofType,
payment_id: PaymentId,
) -> Result<(Transaction, TransactionOutput, TransactionKernel, WalletOutput), CoinbaseBuildError> {
if !wallet_payment_address
.features()
.contains(TariAddressFeatures::create_one_sided_only())
{
return Err(CoinbaseBuildError::BuildError(
"Invalid address, address must be one-sided enabled".to_string(),
));
}
let sender_offset = key_manager
.get_next_key(TransactionKeyManagerBranch::SenderOffset.get_branch_key())
.await?;
Expand Down
Loading