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
1 change: 1 addition & 0 deletions ci/dash/lint-tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ iwyu_tool.py \
"src/rpc/signmessage.cpp" \
"src/test/fuzz/string.cpp" \
"src/test/fuzz/txorphan.cpp" \
"src/test/fuzz/util/" \
"src/util/bip32.cpp" \
"src/util/bytevectorhash.cpp" \
"src/util/check.cpp" \
Expand Down
6 changes: 6 additions & 0 deletions contrib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ Utilities to generate test vectors for the data-driven Dash tests.

### [Verify-Binaries](/contrib/verify-binaries) ###
This script attempts to download and verify the signature file SHA256SUMS.asc from bitcoin.org.

Command Line Tools
---------------------

### [Completions](/contrib/completions) ###
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Shell completions for bash and fish.
File renamed without changes.
File renamed without changes.
File renamed without changes.
99 changes: 99 additions & 0 deletions contrib/completions/fish/dash-cli.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Disable files from being included in completions by default
complete --command dash-cli --no-files

function __fish_dash_cli_get_commands_helper
set --local cmd (commandline -oc)

# Don't return commands if '-help or -?' in commandline
if string match --quiet --regex -- '^-help$|^-\?$' $cmd
return
end

# Strip help cmd from token to avoid duplication errors
set --local cmd (string match --invert --regex -- '^help$' $cmd)
# Strip -stdin* options to avoid waiting for input while we fetch completions
# TODO: this appears to be broken when run as tab completion (requires ctrl+c to exit)
set --local cmd (string match --invert --regex -- '^-stdin.*$' $cmd)

# Match, format and return commands
for command in ($cmd help 2>&1 | string match --invert -r '^\=\=.*' | string match --invert -r '^\\s*$')
echo $command
end
end

function __fish_dash_cli_get_commands
argparse 'nohelp' 'commandsonly' -- $argv
set --local commands

# Exclude description, exclude help
if set -q _flag_nohelp; and set -q _flag_commandsonly
set --append commands (__fish_dash_cli_get_commands_helper | string replace -r ' .*$' '' | string match --invert -r 'help')
# Include description, exclude help
else if set -q _flag_nohelp
set --append commands (__fish_dash_cli_get_commands_helper | string replace ' ' \t | string match --invert -r 'help')
# Exclude description, include help
else if set -q _flag_commandsonly
set --append commands (__fish_dash_cli_get_commands_helper | string replace -r ' .*$' '')
# Include description, include help
else
set --append commands (__fish_dash_cli_get_commands_helper | string replace ' ' \t)
end

if string match -q -r '^.*error.*$' $commands[1]
# RPC offline or RPC wallet not loaded
return
else
for command in $commands
echo $command
end
end
end


function __fish_dash_cli_get_options
argparse 'nofiles' -- $argv
set --local cmd (commandline -oc)
# Don't return options if '-help or -?' in commandline
if string match --quiet --regex -- '^-help$|-\?$' $cmd
return
end
set --local options

if set -q _flag_nofiles
set --append options ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match --invert -r '^.*=$')
else
set --append options ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match -r '^.*=$')
end

for option in $options
echo $option
end
end

# Add options with file completion
# Don't offer after a command is given
complete \
--command dash-cli \
--no-files \
--condition "not __fish_seen_subcommand_from (__fish_dash_cli_get_commands --commandsonly)" \
--arguments "(__fish_dash_cli_get_options)"
# Enable file completions only if the commandline now contains a `*.=` style option
complete --command dash-cli \
--condition 'string match --regex -- ".*=" (commandline -pt)' \
--force-files

# Add options without file completion
# Don't offer after a command is given
complete \
--command dash-cli \
--no-files \
--condition "not __fish_seen_subcommand_from (__fish_dash_cli_get_commands --commandsonly)" \
--arguments "(__fish_dash_cli_get_options --nofiles)"

# Add commands
# Permit command completions after `dash-cli help` but not after other commands
complete \
--command dash-cli \
--no-files \
--condition "not __fish_seen_subcommand_from (__fish_dash_cli_get_commands --commandsonly --nohelp)" \
--arguments "(__fish_dash_cli_get_commands)"
35 changes: 35 additions & 0 deletions contrib/completions/fish/dash-qt.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Disable files from being included in completions by default
complete --command dash-qt --no-files

# Extract options
function __fish_dashqt_get_options
argparse 'nofiles' -- $argv
set --local cmd (commandline -opc)[1]
set --local options

if set -q _flag_nofiles
set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match --invert -r '^.*=$')
else
set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match -r '^.*=$')
end

for option in $options
echo $option
end
end


# Add options with file completion
complete \
--command dash-qt \
--arguments "(__fish_dashqt_get_options)"
# Enable file completions only if the commandline now contains a `*.=` style option
complete -c dash-qt \
--condition 'string match --regex -- ".*=" (commandline -pt)' \
--force-files

# Add options without file completion
complete \
--command dash-qt \
--arguments "(__fish_dashqt_get_options --nofiles)"

65 changes: 65 additions & 0 deletions contrib/completions/fish/dash-tx.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Disable files from being included in completions by default
complete --command dash-tx --no-files

# Modified version of __fish_seen_subcommand_from
# Uses regex to detect cmd= syntax
function __fish_dash_seen_cmd
set -l cmd (commandline -oc)
set -e cmd[1]
for i in $cmd
for j in $argv
if string match --quiet --regex -- "^$j.*" $i
return 0
end
end
end
return 1
end

# Extract options
function __fish_dash_tx_get_options
set --local cmd (commandline -oc)[1]
if string match --quiet --regex -- '^-help$|-\?$' $cmd
return
end

for option in ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=')
echo $option
end
end

# Extract commands
function __fish_dash_tx_get_commands
argparse 'commandsonly' -- $argv
set --local cmd (commandline -oc)[1]
set --local commands

if set -q _flag_commandsonly
set --append commands ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '' | string replace -r '=.*' '')
else
set --append commands ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '')
end

for command in $commands
echo $command
end
end

# Add options
complete \
--command dash-tx \
--condition "not __fish_dash_seen_cmd (__fish_dash_tx_get_commands --commandsonly)" \
--arguments "(__fish_dash_tx_get_options)" \
--no-files

# Add commands
complete \
--command dash-tx \
--arguments "(__fish_dash_tx_get_commands)" \
--no-files

# Add file completions for load and set commands
complete \
--command dash-tx \
--condition 'string match --regex -- "(load|set)=" (commandline -pt)' \
--force-files
38 changes: 38 additions & 0 deletions contrib/completions/fish/dash-util.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Disable files from being included in completions by default
complete --command dash-util --no-files

# Extract options
function __fish_dash_util_get_options
set --local cmd (commandline -opc)[1]
set --local options

set --append options ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=')

for option in $options
echo $option
end
end

# Extract commands
function __fish_dash_util_get_commands
set --local cmd (commandline -opc)[1]
set --local commands

set --append commands ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '')
for command in $commands
echo $command
end
end

# Add options
complete \
--command dash-util \
--condition "not __fish_seen_subcommand_from (__fish_dash_util_get_commands)" \
--arguments "(__fish_dash_util_get_options)"

# Add commands
complete \
--command dash-util \
--condition "not __fish_seen_subcommand_from (__fish_dash_util_get_commands)" \
--arguments "(__fish_dash_util_get_commands)"

35 changes: 35 additions & 0 deletions contrib/completions/fish/dash-wallet.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Disable files from being included in completions by default
complete --command dash-wallet --no-files

# Extract options
function __fish_dash_wallet_get_options
set --local cmd (commandline -opc)[1]
for option in ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=')
echo $option
end
end

# Extract commands
function __fish_dash_wallet_get_commands
set --local cmd (commandline -opc)[1]
for command in ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '')
echo $command
end
end

# Add options
complete \
--command dash-wallet \
--condition "not __fish_seen_subcommand_from (__fish_dash_wallet_get_commands)" \
--arguments "(__fish_dash_wallet_get_options)"

# Add commands
complete \
--command dash-wallet \
--condition "not __fish_seen_subcommand_from (__fish_dash_wallet_get_commands)" \
--arguments "(__fish_dash_wallet_get_commands)"

# Add file completions for load and set commands
complete --command dash-wallet \
--condition "string match -r -- '(dumpfile|datadir)*=' (commandline -pt)" \
--force-files
Comment thread
coderabbitai[bot] marked this conversation as resolved.
35 changes: 35 additions & 0 deletions contrib/completions/fish/dashd.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Disable files from being included in completions by default
complete --command dashd --no-files

# Extract options
function __fish_dashd_get_options
argparse 'nofiles' -- $argv
set --local cmd (commandline -opc)[1]
set --local options

if set -q _flag_nofiles
set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match --invert -r '^.*=$')
else
set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match -r '^.*=$')
end

for option in $options
echo $option
end
end


# Add options with file completion
complete \
--command dashd \
--arguments "(__fish_dashd_get_options)"
# Enable file completions only if the commandline now contains a `*.=` style option
complete --command dashd \
--condition 'string match --regex -- ".*=" (commandline -pt)' \
--force-files

# Add options without file completion
complete \
--command dashd \
--arguments "(__fish_dashd_get_options --nofiles)"

8 changes: 8 additions & 0 deletions doc/release-notes-25934.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Low-level changes
=================

RPC
---

- RPC `listsinceblock` now accepts an optional `label` argument
to fetch incoming transactions having the specified label. (#25934)
7 changes: 3 additions & 4 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ BITCOIN_CORE_H = \
kernel/checks.h \
kernel/coinstats.h \
kernel/context.h \
kernel/mempool_entry.h \
kernel/mempool_limits.h \
kernel/mempool_options.h \
kernel/mempool_persist.h \
Expand Down Expand Up @@ -969,6 +970,7 @@ libbitcoin_common_a_SOURCES = \
coins.cpp \
common/bloom.cpp \
common/init.cpp \
common/interfaces.cpp \
common/run_command.cpp \
compressor.cpp \
core_read.cpp \
Expand Down Expand Up @@ -1014,7 +1016,7 @@ endif
#

# util #
libbitcoin_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS)
libbitcoin_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libbitcoin_util_a_SOURCES = \
bls/bls_batchverifier.h \
Expand All @@ -1026,9 +1028,6 @@ libbitcoin_util_a_SOURCES = \
clientversion.cpp \
coinjoin/common.cpp \
coinjoin/options.cpp \
interfaces/echo.cpp \
interfaces/handler.cpp \
interfaces/init.cpp \
logging.cpp \
messagesigner.cpp \
random.cpp \
Expand Down
1 change: 1 addition & 0 deletions src/bench/mempool_eviction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <bench/bench.h>
#include <kernel/mempool_entry.h>
#include <policy/policy.h>
#include <test/util/setup_common.h>
#include <txmempool.h>
Expand Down
1 change: 1 addition & 0 deletions src/bench/mempool_stress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <bench/bench.h>
#include <kernel/mempool_entry.h>
#include <policy/policy.h>
#include <test/util/setup_common.h>
#include <txmempool.h>
Expand Down
Loading
Loading