mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Allow default asset name to be set via param
This commit is contained in:
parent
5cea189932
commit
dd39cc4f80
6 changed files with 13 additions and 11 deletions
|
|
@ -37,7 +37,7 @@ void CAssetsDir::SetHex(const std::string& assetHex, const std::string& label)
|
|||
Set(CAsset(uint256S(assetHex)), AssetMetadata(label));
|
||||
}
|
||||
|
||||
void CAssetsDir::InitFromStrings(const std::vector<std::string>& assetsToInit)
|
||||
void CAssetsDir::InitFromStrings(const std::vector<std::string>& assetsToInit, const std::string& pegged_asset_name)
|
||||
{
|
||||
for (std::string strToSplit : assetsToInit) {
|
||||
std::vector<std::string> vAssets;
|
||||
|
|
@ -48,7 +48,7 @@ void CAssetsDir::InitFromStrings(const std::vector<std::string>& assetsToInit)
|
|||
SetHex(vAssets[0], vAssets[1]);
|
||||
}
|
||||
// Set "bitcoin" to the pegged asset for tests
|
||||
Set(Params().GetConsensus().pegged_asset, AssetMetadata("bitcoin"));
|
||||
Set(Params().GetConsensus().pegged_asset, AssetMetadata(pegged_asset_name));
|
||||
}
|
||||
|
||||
CAsset CAssetsDir::GetAsset(const std::string& label) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue