aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-11-08 09:42:27 +0800
committerfanquake <fanquake@gmail.com>2021-11-08 09:43:48 +0800
commit12f2b6ac014e873d1ecf55592c7bf071adbb6046 (patch)
treedd528678f65533a177921dd7d50d7eede384d785
parent77a2f5d30c5ecb764b8a7c098492e1f5cdec90f0 (diff)
parentbb1c84082c8a8709fec201f5768deab22c938241 (diff)
Merge bitcoin/bitcoin#23453: Remove the build_msvc/testconsensus project
bb1c84082c8a8709fec201f5768deab22c938241 Remove the build_msvc/testconsensus project (Aaron Clauson) Pull request description: The testconsensus project is not integral to the Bitcoin Core code. It was originally added as a quick and dirty demo of how to do a consensus check with the msvc build. There are better examples. PR #23438 made a change that caused a compiler error with the buildmsvc/testconsensus code. Rather than leave it hanging around to incur potential bitrot, or further PR build failures, it should be removed. ACKs for top commit: hebasto: ACK bb1c84082c8a8709fec201f5768deab22c938241, tested on Windows 10 Pro (20H2). Tree-SHA512: d81b99eb09171b66c179961b15f0b2e2e97e5ee7f011f18667e890c90e3d169593ad9aedd05a8616e962212952048827b7159d3c2a2ecb7ac378136b80bf6b23
-rw-r--r--build_msvc/bitcoin.sln6
-rw-r--r--build_msvc/testconsensus/testconsensus.cpp54
-rw-r--r--build_msvc/testconsensus/testconsensus.vcxproj28
3 files changed, 0 insertions, 88 deletions
diff --git a/build_msvc/bitcoin.sln b/build_msvc/bitcoin.sln
index 1b1f27a8a9..5095617812 100644
--- a/build_msvc/bitcoin.sln
+++ b/build_msvc/bitcoin.sln
@@ -4,8 +4,6 @@ VisualStudioVersion = 16.0.28803.452
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoinconsensus", "libbitcoinconsensus\libbitcoinconsensus.vcxproj", "{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testconsensus", "testconsensus\testconsensus.vcxproj", "{E78473E9-B850-456C-9120-276301E04C06}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bitcoind", "bitcoind\bitcoind.vcxproj", "{D4513DDF-6013-44DC-ADCC-12EAF6D1F038}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_util", "libbitcoin_util\libbitcoin_util.vcxproj", "{B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}"
@@ -60,10 +58,6 @@ Global
{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x64.Build.0 = Debug|x64
{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x64.ActiveCfg = Release|x64
{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x64.Build.0 = Release|x64
- {E78473E9-B850-456C-9120-276301E04C06}.Debug|x64.ActiveCfg = Debug|x64
- {E78473E9-B850-456C-9120-276301E04C06}.Debug|x64.Build.0 = Debug|x64
- {E78473E9-B850-456C-9120-276301E04C06}.Release|x64.ActiveCfg = Release|x64
- {E78473E9-B850-456C-9120-276301E04C06}.Release|x64.Build.0 = Release|x64
{D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x64.ActiveCfg = Debug|x64
{D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x64.Build.0 = Debug|x64
{D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x64.ActiveCfg = Release|x64
diff --git a/build_msvc/testconsensus/testconsensus.cpp b/build_msvc/testconsensus/testconsensus.cpp
deleted file mode 100644
index f3c8517130..0000000000
--- a/build_msvc/testconsensus/testconsensus.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2018-2020 The Bitcoin Core developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include <iostream>
-
-// bitcoin includes.
-#include <..\src\script\bitcoinconsensus.h>
-#include <..\src\primitives\transaction.h>
-#include <..\src\script\script.h>
-#include <..\src\streams.h>
-#include <..\src\version.h>
-
-CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CScriptWitness& scriptWitness, int nValue = 0)
-{
- CMutableTransaction txSpend;
- txSpend.nVersion = 1;
- txSpend.nLockTime = 0;
- txSpend.vin.resize(1);
- txSpend.vout.resize(1);
- txSpend.vin[0].scriptWitness = scriptWitness;
- txSpend.vin[0].prevout.hash = uint256();
- txSpend.vin[0].prevout.n = 0;
- txSpend.vin[0].scriptSig = scriptSig;
- txSpend.vin[0].nSequence = CTxIn::SEQUENCE_FINAL;
- txSpend.vout[0].scriptPubKey = CScript();
- txSpend.vout[0].nValue = nValue;
-
- return txSpend;
-}
-
-int main()
-{
- std::cout << "bitcoinconsensus version: " << bitcoinconsensus_version() << std::endl;
-
- CScript pubKeyScript;
- pubKeyScript << OP_1 << OP_0 << OP_1;
-
- int amount = 0; // 600000000;
-
- CScript scriptSig;
- CScriptWitness scriptWitness;
- CTransaction vanillaSpendTx = BuildSpendingTransaction(scriptSig, scriptWitness, amount);
- CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
- stream << vanillaSpendTx;
-
- bitcoinconsensus_error err;
- auto op0Result = bitcoinconsensus_verify_script_with_amount(pubKeyScript.data(), pubKeyScript.size(), amount, stream.data(), stream.size(), 0, bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL, &err);
- std::cout << "Op0 result: " << op0Result << ", error code " << err << std::endl;
-
- getchar();
-
- return 0;
-}
diff --git a/build_msvc/testconsensus/testconsensus.vcxproj b/build_msvc/testconsensus/testconsensus.vcxproj
deleted file mode 100644
index 776c40920a..0000000000
--- a/build_msvc/testconsensus/testconsensus.vcxproj
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\common.init.vcxproj" />
- <PropertyGroup Label="Globals">
- <ProjectGuid>{E78473E9-B850-456C-9120-276301E04C06}</ProjectGuid>
- </PropertyGroup>
- <PropertyGroup Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- </PropertyGroup>
- <ItemGroup>
- <ClCompile Include="testconsensus.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
- <Project>{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}</Project>
- </ProjectReference>
- <ProjectReference Include="..\libbitcoin_util\libbitcoin_util.vcxproj">
- <Project>{B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}</Project>
- </ProjectReference>
- <ProjectReference Include="..\libsecp256k1\libsecp256k1.vcxproj">
- <Project>{BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <Import Project="..\common.vcxproj" />
-</Project>