Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions builds/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ endif()
set( GIT_COMMIT_HASH "unknown" )
set( GIT_COMMIT_HEIGHT 0 )
set( GIT_DIRTY 0 )
set( GIT_ORIGIN_URL "unknown" )

if ( GIT_EXECUTABLE )
execute_process(
Expand All @@ -38,17 +37,6 @@ if ( GIT_EXECUTABLE )
set( GIT_COMMIT_HEIGHT 0 )
endif()

execute_process(
COMMAND ${GIT_EXECUTABLE} ls-remote --get-url
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_ORIGIN_URL
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET )

if ( NOT GIT_ORIGIN_URL MATCHES "://|@" )
set( GIT_ORIGIN_URL "unknown" )
endif()

execute_process(
COMMAND ${GIT_EXECUTABLE} status --porcelain
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
Expand Down
2 changes: 0 additions & 2 deletions builds/gnu/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,11 @@ src/version.cpp: FORCE
@${MKDIR_P} src
@commit=`git -C ${srcdir} rev-parse HEAD 2>/dev/null || echo unknown`; \
height=`git -C ${srcdir} rev-list --count HEAD 2>/dev/null || echo 0`; \
url=`git -C ${srcdir} ls-remote --get-url 2>/dev/null | grep -e '://' -e '@' || echo unknown`; \
if git -C ${srcdir} status --porcelain 2>/dev/null | grep -q . ; then dirty=1; else dirty=0; fi; \
sed -e "s|[@]LIBBITCOIN_VERSION_MAJOR[@]|${LIBBITCOIN_VERSION_MAJOR}|g" \
-e "s|[@]LIBBITCOIN_VERSION_MINOR[@]|${LIBBITCOIN_VERSION_MINOR}|g" \
-e "s|[@]LIBBITCOIN_VERSION_PATCH[@]|$$height|g" \
-e "s|[@]GIT_COMMIT_HASH[@]|$$commit|g" \
-e "s|[@]GIT_ORIGIN_URL[@]|$$url|g" \
-e "s|[@]GIT_DIRTY[@]|$$dirty|g" \
${srcdir}/../../src/version.cpp.in > $@.tmp; \
if cmp -s $@.tmp $@; then rm -f $@.tmp; else mv -f $@.tmp $@; fi
Expand Down
5 changes: 0 additions & 5 deletions builds/gnu/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ m4_define([_git_dirty],

m4_define([_GIT_DIRTY], m4_ifnblank(_git_dirty, [_git_dirty], [0]))

m4_define([_GIT_ORIGIN_URL],
m4_dquote(m4_esyscmd_s([git ls-remote --get-url 2>/dev/null | grep -e '://' -e '@' || echo unknown])))

m4_define([_LIBBITCOIN_VERSION_MAJOR], [4])
m4_define([_LIBBITCOIN_VERSION_MINOR], [0])
m4_define([_LIBBITCOIN_VERSION_PATCH], [_GIT_COMMIT_HEIGHT])
Expand All @@ -44,8 +41,6 @@ AC_SUBST([GIT_COMMIT_HEIGHT], [_GIT_COMMIT_HEIGHT])
AC_MSG_NOTICE([GIT_COMMIT_HEIGHT : ${GIT_COMMIT_HEIGHT}])
AC_SUBST([GIT_DIRTY], [_GIT_DIRTY])
AC_MSG_NOTICE([GIT_DIRTY : ${GIT_DIRTY}])
AC_SUBST([GIT_ORIGIN_URL], [_GIT_ORIGIN_URL])
AC_MSG_NOTICE([GIT_ORIGIN_URL : ${GIT_ORIGIN_URL}])

AC_SUBST([LIBBITCOIN_VERSION_MAJOR], [_LIBBITCOIN_VERSION_MAJOR])
AC_MSG_NOTICE([LIBBITCOIN_VERSION_MAJOR : ${LIBBITCOIN_VERSION_MAJOR}])
Expand Down
5 changes: 0 additions & 5 deletions builds/msvc/properties/Git.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@
<Exec Command="git -C &quot;$(RepoRoot).&quot; status --porcelain 2&gt;nul" Condition="'$(GitDirty)' == ''" ConsoleToMSBuild="true" EchoOff="true" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" StandardOutputImportance="low">
<Output TaskParameter="ConsoleOutput" PropertyName="_GitStatus" />
</Exec>
<Exec Command="git -C &quot;$(RepoRoot).&quot; ls-remote --get-url 2&gt;nul" Condition="'$(GitOriginUrl)' == ''" ConsoleToMSBuild="true" EchoOff="true" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" StandardOutputImportance="low">
<Output TaskParameter="ConsoleOutput" PropertyName="GitOriginUrl" />
</Exec>

<PropertyGroup>
<GitCommitHash Condition="!$([System.Text.RegularExpressions.Regex]::IsMatch('$(GitCommitHash)', '^[0-9a-f]{40}$'))">unknown</GitCommitHash>
<GitCommitHeight Condition="!$([System.Text.RegularExpressions.Regex]::IsMatch('$(GitCommitHeight)', '^[0-9]+$'))">0</GitCommitHeight>
<GitDirty Condition="'$(GitDirty)' == '' And '$(_GitStatus)' != ''">1</GitDirty>
<GitDirty Condition="'$(GitDirty)' == ''">0</GitDirty>
<GitOriginUrl Condition="!$([System.Text.RegularExpressions.Regex]::IsMatch('$(GitOriginUrl)', '^(https?|ssh|git)://[^;\s]+$|^[^@;\s]+@[^:;\s]+:[^;\s]+$'))">unknown</GitOriginUrl>
<VersionPatch Condition="'$(VersionPatch)' == ''">$(GitCommitHeight)</VersionPatch>
</PropertyGroup>

Expand All @@ -36,7 +32,6 @@
<_Configured>$(_Configured.Replace('@LIBBITCOIN_VERSION_MINOR@', '$(VersionMinor)'))</_Configured>
<_Configured>$(_Configured.Replace('@LIBBITCOIN_VERSION_PATCH@', '$(VersionPatch)'))</_Configured>
<_Configured>$(_Configured.Replace('@GIT_COMMIT_HASH@', '$(GitCommitHash)'))</_Configured>
<_Configured>$(_Configured.Replace('@GIT_ORIGIN_URL@', '$(GitOriginUrl)'))</_Configured>
<_Configured>$(_Configured.Replace('@GIT_DIRTY@', '$(GitDirty)'))</_Configured>
</PropertyGroup>

Expand Down
1 change: 0 additions & 1 deletion include/bitcoin/node/version.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ struct build_version_t
{
std::string_view semantic;
std::string_view commit_hash;
std::string_view repository_url;
bool dirty;
};

Expand Down
4 changes: 4 additions & 0 deletions src/chasers/chaser_confirm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ bool chaser_confirm::confirm_block(const header_link& link, size_t height,

if (const auto ec = query.block_confirmable(link))
{
// Database errors are fatal (or disk full recoverable).
if (database::error::error_category::contains(ec))
return complete_block(ec, link, height, false);

if (!query.set_block_unconfirmable(link))
{
fault(error::confirm9);
Expand Down
3 changes: 2 additions & 1 deletion src/chasers/chaser_validate_parallel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ void chaser_validate::validate_block(const header_link& link,
else if ((ec = validate(batched, capturing, block, spends, conflicts,
link, ctx)))
{
if (!query.set_block_unconfirmable(link))
if (!node::error::error_category::contains(ec) &&
!query.set_block_unconfirmable(link))
ec = error::validate5;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/version.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const build_version_t& build_version() noexcept
{
"@LIBBITCOIN_VERSION_MAJOR@.@LIBBITCOIN_VERSION_MINOR@.@LIBBITCOIN_VERSION_PATCH@",
"@GIT_COMMIT_HASH@",
"@GIT_ORIGIN_URL@",
@GIT_DIRTY@ != 0
};

Expand Down
Loading
Loading