Revert "AddBogusOrchardSpends"
This reverts commit d33b0dd0105e66a4788f595412f1289632a6ba5d.
This commit is contained in:
parent
652a0df78d
commit
9bee74e370
|
@ -1260,6 +1260,8 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
|
|||
[[package]]
|
||||
name = "orchard"
|
||||
version = "0.1.0-beta.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b48e6e124c3f7e9ed7f48b29f66069288235cecd16aa6053e98f8aff16efe827"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"arrayvec 0.7.2",
|
||||
|
|
|
@ -87,7 +87,6 @@ codegen-units = 1
|
|||
|
||||
[patch.crates-io]
|
||||
hdwallet = { git = "https://github.com/nuttycom/hdwallet", rev = "576683b9f2865f1118c309017ff36e01f84420c9" }
|
||||
orchard = { path = "../orchard/" }
|
||||
zcash_address = { git = "https://github.com/zcash/librustzcash.git", rev = "9c1ed86c5aa8ae3b6d6dcc1478f2d6ba1264488f" }
|
||||
zcash_encoding = { git = "https://github.com/zcash/librustzcash.git", rev = "9c1ed86c5aa8ae3b6d6dcc1478f2d6ba1264488f" }
|
||||
zcash_history = { git = "https://github.com/zcash/librustzcash.git", rev = "9c1ed86c5aa8ae3b6d6dcc1478f2d6ba1264488f" }
|
||||
|
|
|
@ -42,10 +42,6 @@ OrchardBuilderPtr* orchard_builder_new(
|
|||
/// Frees an Orchard builder returned from `orchard_builder_new`.
|
||||
void orchard_builder_free(OrchardBuilderPtr* ptr);
|
||||
|
||||
bool orchard_builder_duplicate_nullifier_spend(
|
||||
OrchardBuilderPtr* ptr
|
||||
);
|
||||
|
||||
/// Adds a note to be spent in this bundle.
|
||||
///
|
||||
/// Returns `false` if the Merkle path in `spend_info` does not have the
|
||||
|
|
|
@ -66,17 +66,6 @@ pub extern "C" fn orchard_builder_new(
|
|||
)))
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn orchard_builder_duplicate_nullifier_spend(
|
||||
builder: *mut Builder
|
||||
) -> bool {
|
||||
let builder = unsafe { builder.as_mut() }.expect("Builder may not be null.");
|
||||
|
||||
builder.add_duplicate_nullifier_spend(OsRng);
|
||||
|
||||
true
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn orchard_builder_add_spend(
|
||||
builder: *mut Builder,
|
||||
|
|
|
@ -42,16 +42,6 @@ Builder::Builder(
|
|||
inner.reset(orchard_builder_new(spendsEnabled, outputsEnabled, anchor.IsNull() ? nullptr : anchor.begin()));
|
||||
}
|
||||
|
||||
void Builder::AddBogusSpends()
|
||||
{
|
||||
if (!inner) {
|
||||
throw std::logic_error("orchard::Builder has already been used");
|
||||
}
|
||||
|
||||
orchard_builder_duplicate_nullifier_spend(inner.get());
|
||||
hasActions = true;
|
||||
}
|
||||
|
||||
bool Builder::AddSpend(orchard::SpendInfo spendInfo)
|
||||
{
|
||||
if (!inner) {
|
||||
|
@ -302,15 +292,6 @@ bool TransactionBuilder::SupportsOrchard() const {
|
|||
return orchardBuilder.has_value();
|
||||
}
|
||||
|
||||
void TransactionBuilder::AddBogusOrchardSpends()
|
||||
{
|
||||
if (!orchardBuilder.has_value()) {
|
||||
throw std::runtime_error("TransactionBuilder orchardBuilder not setup");
|
||||
}
|
||||
|
||||
orchardBuilder.value().AddBogusSpends();
|
||||
}
|
||||
|
||||
bool TransactionBuilder::AddOrchardSpend(
|
||||
libzcash::OrchardSpendingKey sk,
|
||||
orchard::SpendInfo spendInfo)
|
||||
|
|
|
@ -101,8 +101,6 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
void AddBogusSpends();
|
||||
|
||||
/// Adds a note to be spent in this bundle.
|
||||
///
|
||||
/// Returns `false` if the given Merkle path does not have the required anchor
|
||||
|
@ -339,8 +337,6 @@ public:
|
|||
|
||||
bool SupportsOrchard() const;
|
||||
|
||||
void AddBogusOrchardSpends();
|
||||
|
||||
bool AddOrchardSpend(
|
||||
libzcash::OrchardSpendingKey sk,
|
||||
orchard::SpendInfo spendInfo);
|
||||
|
|
Loading…
Reference in New Issue