Skip to content

Commit 9a771df

Browse files
committed
Merge branch 'eager_electron_5.3RC' into mainnet_5.3RC
2 parents 91a2565 + ea5032f commit 9a771df

File tree

3 files changed

+40
-49
lines changed

3 files changed

+40
-49
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -122,25 +122,6 @@ jobs:
122122
###############################################################################
123123
# Collect artifacts
124124
###############################################################################
125-
- name: Collect [macos-10.15 && ununtu all]
126-
shell: bash
127-
if: matrix.os != 'windows-2019'
128-
run: |
129-
mkdir artifacts
130-
cp beam/beam-node${{env.BEAM_TARGET_SUFFIX}} artifacts/beam-node${{env.BEAM_TARGET_SUFFIX}}
131-
chmod +x artifacts/beam-node${{env.BEAM_TARGET_SUFFIX}}
132-
cp beam/beam-node.cfg artifacts/beam-node.cfg
133-
cp wallet/cli/beam-wallet${{env.BEAM_TARGET_SUFFIX}} artifacts/beam-wallet${{env.BEAM_TARGET_SUFFIX}}
134-
chmod +x artifacts/beam-node${{env.BEAM_TARGET_SUFFIX}}
135-
cp wallet/cli/beam-wallet.cfg artifacts/beam-wallet.cfg
136-
cp wallet/api/wallet-api${{env.BEAM_TARGET_SUFFIX}} artifacts/wallet-api${{env.BEAM_TARGET_SUFFIX}}
137-
chmod +x artifacts/wallet-api${{env.BEAM_TARGET_SUFFIX}}
138-
cp wallet/api/wallet-api.cfg artifacts/wallet-api.cfg
139-
cp explorer/explorer-node${{env.BEAM_TARGET_SUFFIX}} artifacts/explorer-node${{env.BEAM_TARGET_SUFFIX}}
140-
chmod +x artifacts/explorer-node${{env.BEAM_TARGET_SUFFIX}}
141-
cp explorer/explorer-node.cfg artifacts/explorer-node.cfg
142-
cp wallet/broadcaster/broadcaster${{env.BEAM_TARGET_SUFFIX}} artifacts/broadcaster${{env.BEAM_TARGET_SUFFIX}}
143-
chmod +x artifacts/broadcaster${{env.BEAM_TARGET_SUFFIX}}
144125
- name: Import Code-Signing Certificates [macos-10.15]
145126
if: matrix.os == 'macos-10.15'
146127
uses: Apple-Actions/import-codesign-certs@v1
@@ -150,11 +131,22 @@ jobs:
150131
- name: Sign the mac binaries [macos-10.15]
151132
if: matrix.os == 'macos-10.15'
152133
run: |
153-
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp artifacts/beam-node${{env.BEAM_TARGET_SUFFIX}}
154-
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp artifacts/beam-wallet${{env.BEAM_TARGET_SUFFIX}}
155-
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp artifacts/wallet-api${{env.BEAM_TARGET_SUFFIX}}
156-
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp artifacts/explorer-node${{env.BEAM_TARGET_SUFFIX}}
157-
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp artifacts/broadcaster${{env.BEAM_TARGET_SUFFIX}}
134+
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp beam/beam-node${{env.BEAM_TARGET_SUFFIX}}
135+
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp wallet/cli/beam-wallet${{env.BEAM_TARGET_SUFFIX}}
136+
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp wallet/api/wallet-api${{env.BEAM_TARGET_SUFFIX}}
137+
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp explorer/explorer-node${{env.BEAM_TARGET_SUFFIX}}
138+
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp wallet/broadcaster/broadcaster${{env.BEAM_TARGET_SUFFIX}}
139+
140+
- name: Collect [macos-10.15 && ununtu all]
141+
shell: bash
142+
if: matrix.os != 'windows-2019'
143+
run: |
144+
mkdir artifacts
145+
tar -cvf artifacts/beam-node.tar -C beam beam-node${{env.BEAM_TARGET_SUFFIX}} beam-node.cfg
146+
tar -cvf artifacts/beam-wallet.tar -C wallet/cli beam-wallet${{env.BEAM_TARGET_SUFFIX}} beam-wallet.cfg
147+
tar -cvf artifacts/wallet-api.tar -C wallet/api wallet-api${{env.BEAM_TARGET_SUFFIX}} wallet-api.cfg
148+
tar -cvf artifacts/explorer-node.tar -C explorer explorer-node${{env.BEAM_TARGET_SUFFIX}} explorer-node.cfg
149+
tar -cvf artifacts/broadcaster.tar -C wallet/broadcaster broadcaster${{env.BEAM_TARGET_SUFFIX}}
158150
159151
- name: Collect [windows]
160152
shell: bash

wallet/core/base_transaction.cpp

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,8 @@ namespace beam::wallet
487487

488488
void BaseTransaction::SetCompletedTxCoinStatuses(Height proofHeight)
489489
{
490-
std::vector<Coin> modified = GetWalletDB()->getCoinsByTx(GetTxID());
490+
auto walletDb = GetWalletDB();
491+
std::vector<Coin> modified = walletDb->getCoinsByTx(GetTxID());
491492
for (auto& coin : modified)
492493
{
493494
bool bIn = (coin.m_createTxId && *coin.m_createTxId == GetTxID());
@@ -506,7 +507,28 @@ namespace beam::wallet
506507
}
507508
}
508509

509-
GetWalletDB()->saveCoins(modified);
510+
walletDb->saveCoins(modified);
511+
512+
std::vector<IPrivateKeyKeeper2::ShieldedInput> inputShielded;
513+
GetParameter(TxParameterID::InputCoinsShielded, inputShielded);
514+
515+
if (!inputShielded.empty())
516+
{
517+
Block::SystemState::Full sTip;
518+
walletDb->get_History().get_Tip(sTip);
519+
520+
for(const auto& coin : inputShielded)
521+
{
522+
auto shieldedCoin = walletDb->getShieldedCoin(coin.m_Key);
523+
if (shieldedCoin)
524+
{
525+
shieldedCoin->m_spentTxId = GetTxID();
526+
shieldedCoin->m_spentHeight = sTip.m_Height;
527+
shieldedCoin->m_Status = ShieldedCoin::Status::Spent;
528+
walletDb->saveShieldedCoin(*shieldedCoin);
529+
}
530+
}
531+
}
510532
}
511533

512534
void BaseTransaction::LogFailedParameter(TxParameterID paramID, SubTxID subTxID) const

wallet/core/wallet.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -388,29 +388,6 @@ namespace beam::wallet
388388
auto it = m_ActiveTransactions.find(txID);
389389
if (it != m_ActiveTransactions.end())
390390
{
391-
if (!IsConnectedToOwnNode() && !m_IsBodyRequestsEnabled)
392-
{
393-
std::vector<IPrivateKeyKeeper2::ShieldedInput> inputShielded;
394-
it->second->GetParameter(TxParameterID::InputCoinsShielded, inputShielded);
395-
if (!inputShielded.empty())
396-
{
397-
Block::SystemState::Full sTip;
398-
get_tip(sTip);
399-
400-
for(const auto& coin : inputShielded)
401-
{
402-
auto shieldedCoin = m_WalletDB->getShieldedCoin(coin.m_Key);
403-
if (shieldedCoin)
404-
{
405-
shieldedCoin->m_spentTxId = txID;
406-
shieldedCoin->m_spentHeight = sTip.m_Height;
407-
shieldedCoin->m_Status = ShieldedCoin::Status::Spent;
408-
m_WalletDB->saveShieldedCoin(*shieldedCoin);
409-
}
410-
}
411-
}
412-
}
413-
414391
pGuard.swap(it->second);
415392
m_ActiveTransactions.erase(it);
416393
m_NextTipTransactionToUpdate.erase(pGuard);

0 commit comments

Comments
 (0)