Fix CI: update transaction_tests for UTXO model, fix inetc plugin install

- transaction_tests.cpp: use COutPoint+CUtxoEntry instead of old MapPrevTx
- build-all.yml: use msys2 shell for inetc plugin download/install

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 00:24:23 -07:00
parent 014947580b
commit 557d5807d8
2 changed files with 44 additions and 7 deletions
+16 -5
View File
@@ -165,12 +165,23 @@ jobs:
run: pacman -S --noconfirm mingw-w64-x86_64-nsis
- name: Install NSIS inetc plugin
shell: pwsh
run: |
$nsisDir = (msys2 -c "cygpath -w /mingw64/share/nsis")
Invoke-WebRequest -Uri "https://nsis.sourceforge.io/mediawiki/images/c/c9/Inetc.zip" -OutFile "$env:TEMP\Inetc.zip"
Expand-Archive "$env:TEMP\Inetc.zip" -DestinationPath "$env:TEMP\inetc"
Copy-Item "$env:TEMP\inetc\Plugins\x86-unicode\INetC.dll" "$nsisDir\Plugins\unicode\" -Force
NSIS_DIR="/mingw64/share/nsis"
cd /tmp
curl -L -o Inetc.zip "https://nsis.sourceforge.io/mediawiki/images/c/c9/Inetc.zip"
unzip -o Inetc.zip -d inetc_extract
# Try both common directory layouts in the zip
if [ -f "inetc_extract/Plugins/x86-unicode/INetC.dll" ]; then
cp inetc_extract/Plugins/x86-unicode/INetC.dll "$NSIS_DIR/Plugins/unicode/"
elif [ -f "inetc_extract/Plugins/unicode/INetC.dll" ]; then
cp inetc_extract/Plugins/unicode/INetC.dll "$NSIS_DIR/Plugins/unicode/"
else
echo "=== inetc zip contents ==="
find inetc_extract -name "*.dll" -o -name "*.DLL" | head -20
echo "=== Trying any INetC.dll found ==="
find inetc_extract -iname "inetc.dll" -exec cp {} "$NSIS_DIR/Plugins/unicode/" \;
fi
ls -la "$NSIS_DIR/Plugins/unicode/" | grep -i inet || echo "WARNING: INetC.dll not found after install"
- name: Build NSIS installer
run: makensis //DVERSION=$VERSION contrib/nsis/setup.nsi
+28 -2
View File
@@ -61,14 +61,40 @@ SetupDummyInputs(CBasicKeyStore& keystoreRet, MapPrevTx& inputsRet)
dummyTransactions[0].vout[0].scriptPubKey << key[0].GetPubKey() << OP_CHECKSIG;
dummyTransactions[0].vout[1].nValue = 50*CENT;
dummyTransactions[0].vout[1].scriptPubKey << key[1].GetPubKey() << OP_CHECKSIG;
inputsRet[dummyTransactions[0].GetHash()] = make_pair(CTxIndex(), dummyTransactions[0]);
{
uint256 hash0 = dummyTransactions[0].GetHash();
for (unsigned int i = 0; i < dummyTransactions[0].vout.size(); i++)
{
CUtxoEntry entry;
entry.nValue = dummyTransactions[0].vout[i].nValue;
entry.nHeight = 1;
entry.scriptPubKey = dummyTransactions[0].vout[i].scriptPubKey;
entry.fCoinBase = false;
entry.fCoinStake = false;
entry.nTxTime = 0;
inputsRet[COutPoint(hash0, i)] = entry;
}
}
dummyTransactions[1].vout.resize(2);
dummyTransactions[1].vout[0].nValue = 21*CENT;
dummyTransactions[1].vout[0].scriptPubKey.SetDestination(key[2].GetPubKey().GetID());
dummyTransactions[1].vout[1].nValue = 22*CENT;
dummyTransactions[1].vout[1].scriptPubKey.SetDestination(key[3].GetPubKey().GetID());
inputsRet[dummyTransactions[1].GetHash()] = make_pair(CTxIndex(), dummyTransactions[1]);
{
uint256 hash1 = dummyTransactions[1].GetHash();
for (unsigned int i = 0; i < dummyTransactions[1].vout.size(); i++)
{
CUtxoEntry entry;
entry.nValue = dummyTransactions[1].vout[i].nValue;
entry.nHeight = 1;
entry.scriptPubKey = dummyTransactions[1].vout[i].scriptPubKey;
entry.fCoinBase = false;
entry.fCoinStake = false;
entry.nTxTime = 0;
inputsRet[COutPoint(hash1, i)] = entry;
}
}
return dummyTransactions;
}