Fix CI: update test for UTXO model, remove bootstrap from installer

- Update script_P2SH_tests.cpp to use new MapPrevTx (COutPoint->CUtxoEntry)
- Remove obsolete bootstrap download from NSIS installer (requires inetc
  plugin; nodes now sync fast from network)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-03 22:21:02 -07:00
parent 89dad5818f
commit 35c4a2c823
2 changed files with 14 additions and 52 deletions
-50
View File
@@ -32,9 +32,6 @@ RequestExecutionLevel user
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
; Bootstrap page
Page custom BootstrapPage
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
@@ -43,34 +40,6 @@ Page custom BootstrapPage
!insertmacro MUI_LANGUAGE "English"
; Bootstrap selection variable
Var BootstrapChoice
; Bootstrap page function
Function BootstrapPage
!insertmacro MUI_HEADER_TEXT "Blockchain Sync" "Choose how to synchronize the blockchain"
nsDialogs::Create 1018
Pop $0
${NSD_CreateLabel} 0 10u 100% 20u "The Triangles blockchain requires ~1GB of data. Choose sync method:"
Pop $0
${NSD_CreateRadioButton} 10u 40u 100% 12u "Download bootstrap (~1.3GB) — Recommended (fast)"
Pop $1
${NSD_Check} $1
${NSD_CreateRadioButton} 10u 60u 100% 12u "Sync from network — Slow (may take days)"
Pop $2
${NSD_CreateLabel} 10u 80u 100% 30u "Bootstrap will download a recent blockchain snapshot, saving hours or days of sync time. Network bandwidth required: ~1.3GB."
Pop $0
nsDialogs::Show
${NSD_GetState} $1 $BootstrapChoice
FunctionEnd
Section "Install"
SetOutPath "$INSTDIR"
@@ -84,25 +53,6 @@ Section "Install"
; Create data directory
CreateDirectory "$APPDATA\Triangles"
; Download blockchain bootstrap if selected
${If} $BootstrapChoice == ${BST_CHECKED}
DetailPrint "Downloading blockchain bootstrap..."
inetc::get /CAPTION "Downloading Blockchain" /CANCELTEXT "Skip" \
"http://bootstrap.cryptographic-triangles.org/tri-blockchain.tar.gz" \
"$TEMP\tri-blockchain.tar.gz" /END
Pop $0
${If} $0 == "OK"
DetailPrint "Extracting blockchain..."
nsExec::ExecToLog '"$INSTDIR\7z.exe" x "$TEMP\tri-blockchain.tar.gz" -o"$TEMP" -y'
nsExec::ExecToLog '"$INSTDIR\7z.exe" x "$TEMP\tri-blockchain.tar" -o"$APPDATA\Triangles" -y'
Delete "$TEMP\tri-blockchain.tar.gz"
Delete "$TEMP\tri-blockchain.tar"
DetailPrint "Blockchain bootstrap installed!"
${Else}
DetailPrint "Bootstrap download failed or skipped — will sync from network"
${EndIf}
${EndIf}
; Uninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"
+14 -2
View File
@@ -236,7 +236,7 @@ BOOST_AUTO_TEST_CASE(switchover)
BOOST_AUTO_TEST_CASE(AreInputsStandard)
{
std::map<uint256, std::pair<CTxIndex, CTransaction> > mapInputs;
MapPrevTx mapInputs;
CBasicKeyStore keystore;
CKey key[3];
vector<CKey> keys;
@@ -273,7 +273,19 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
oneOfEleven << OP_11 << OP_CHECKMULTISIG;
txFrom.vout[5].scriptPubKey.SetDestination(oneOfEleven.GetID());
mapInputs[txFrom.GetHash()] = make_pair(CTxIndex(), txFrom);
// Populate UTXO entries for each output of txFrom
uint256 hashFrom = txFrom.GetHash();
for (unsigned int i = 0; i < txFrom.vout.size(); i++)
{
CUtxoEntry entry;
entry.nValue = txFrom.vout[i].nValue;
entry.nHeight = 1;
entry.scriptPubKey = txFrom.vout[i].scriptPubKey;
entry.fCoinBase = false;
entry.fCoinStake = false;
entry.nTxTime = 0;
mapInputs[COutPoint(hashFrom, i)] = entry;
}
CTransaction txTo;
txTo.vout.resize(1);