-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5552 from nuttycom/feature/wallet_orchard-add_orc…
…hard Add Rust backend for the Orchard components of the zcashd wallet.
- Loading branch information
Showing
24 changed files
with
1,249 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// Copyright (c) 2022 The Zcash developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or https://www.opensource.org/licenses/mit-license.php . | ||
|
||
#ifndef ZCASH_GTEST_TEST_TRANSACTION_BUILDER_H | ||
#define ZCASH_GTEST_TEST_TRANSACTION_BUILDER_H | ||
|
||
#include "coins.h" | ||
|
||
// Fake an empty view | ||
class TransactionBuilderCoinsViewDB : public CCoinsView { | ||
public: | ||
std::map<uint256, SproutMerkleTree> sproutTrees; | ||
|
||
TransactionBuilderCoinsViewDB() {} | ||
|
||
bool GetSproutAnchorAt(const uint256 &rt, SproutMerkleTree &tree) const { | ||
auto it = sproutTrees.find(rt); | ||
if (it != sproutTrees.end()) { | ||
tree = it->second; | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
|
||
bool GetSaplingAnchorAt(const uint256 &rt, SaplingMerkleTree &tree) const { | ||
return false; | ||
} | ||
|
||
bool GetOrchardAnchorAt(const uint256 &rt, OrchardMerkleFrontier &tree) const { | ||
return false; | ||
} | ||
|
||
bool GetNullifier(const uint256 &nf, ShieldedType type) const { | ||
return false; | ||
} | ||
|
||
bool GetCoins(const uint256 &txid, CCoins &coins) const { | ||
return false; | ||
} | ||
|
||
bool HaveCoins(const uint256 &txid) const { | ||
return false; | ||
} | ||
|
||
uint256 GetBestBlock() const { | ||
uint256 a; | ||
return a; | ||
} | ||
|
||
uint256 GetBestAnchor(ShieldedType type) const { | ||
uint256 a; | ||
return a; | ||
} | ||
|
||
bool BatchWrite(CCoinsMap &mapCoins, | ||
const uint256 &hashBlock, | ||
const uint256 &hashSproutAnchor, | ||
const uint256 &hashSaplingAnchor, | ||
CAnchorsSproutMap &mapSproutAnchors, | ||
CAnchorsSaplingMap &mapSaplingAnchors, | ||
CNullifiersMap &mapSproutNullifiers, | ||
CNullifiersMap saplingNullifiersMap) { | ||
return false; | ||
} | ||
|
||
bool GetStats(CCoinsStats &stats) const { | ||
return false; | ||
} | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.