Branch: refs/heads/master
Home: https://github.com/btcsuite/btcd
Commit: d3aebcaed3d4275bcbfabd19c726c67c1b558edd
https://github.com/btcsuite/btcd/commit/d3aebcaed3d4275bcbfabd19c726c67c1b558edd
Author: Dave Collins <[email protected]>
Date: 2015-03-13 (Fri, 13 Mar 2015)
Changed paths:
M cmd/btcctl/btcctl.go
M cmd/btcctl/config.go
Log Message:
-----------
btcctl: Support - argument to read from stdin.
This commit modifies the argument handling for btcctl to treat a
parameter that is a single dash as an indicator to read that paramter from
stdin instead.
This change allows commands, such as the submitblock, to accept data piped
from stdin for any parameter. This, in turn, allows large arguments, such
as blocks, which can often be too big for a single argument due to
Operating System limitations to be submitted by putting them into a file
and redirecting stdin.
For example:
btcctl submitblock - <block.hex
cat block.hex | btcctl submitblock -
btcctl sendrawtransaction - <tx.hex
cat tx.hex | btcctl sendrawtransaction -