Commit Graph

35 Commits

Author SHA1 Message Date
DrahtBot eb7daf4d60 Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
Kevin Pan bcab47bc1b use base58 map instead of strchr() 2018-03-21 11:57:57 +08:00
Pieter Wuille 119b0f85e2 Split key_io (address/key encodings) off from base58 2018-02-19 18:55:21 -08:00
Pieter Wuille ebfe217b15 Stop using CBase58Data for ext keys 2018-02-19 18:55:21 -08:00
Pieter Wuille 32e69fa0df Replace CBitcoinSecret with {Encode,Decode}Secret 2018-02-19 18:55:20 -08:00
Akira Takizawa 595a7bab23 Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
MeshCollider 1a445343f6 scripted-diff: Replace #include "" with #include <> (ryanofsky)
-BEGIN VERIFY SCRIPT-
for f in \
  src/*.cpp \
  src/*.h \
  src/bench/*.cpp \
  src/bench/*.h \
  src/compat/*.cpp \
  src/compat/*.h \
  src/consensus/*.cpp \
  src/consensus/*.h \
  src/crypto/*.cpp \
  src/crypto/*.h \
  src/crypto/ctaes/*.h \
  src/policy/*.cpp \
  src/policy/*.h \
  src/primitives/*.cpp \
  src/primitives/*.h \
  src/qt/*.cpp \
  src/qt/*.h \
  src/qt/test/*.cpp \
  src/qt/test/*.h \
  src/rpc/*.cpp \
  src/rpc/*.h \
  src/script/*.cpp \
  src/script/*.h \
  src/support/*.cpp \
  src/support/*.h \
  src/support/allocators/*.h \
  src/test/*.cpp \
  src/test/*.h \
  src/wallet/*.cpp \
  src/wallet/*.h \
  src/wallet/test/*.cpp \
  src/wallet/test/*.h \
  src/zmq/*.cpp \
  src/zmq/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-
2017-11-16 08:23:01 +13:00
Wladimir J. van der Laan da0478e6e5
Merge #10961: Improve readability of DecodeBase58Check(...)
c6a995e Improve readability of DecodeBase58Check(...) (practicalswift)

Pull request description:

  Use the more readable form ...

  ```c++
  &vchRet[vchRet.size() - 4]
  ```

  ... instead of ...

  ```c++
  &v.end()[-n]
  ```

  Has the added benefit of eliminating a spurious static analyzer warning about improper use of negative values.

Tree-SHA512: 5895310c189e9322082c28f34342ff9a6c238e2cae3f204521111c8a7981bc555af60b42de082c91608c1125dfc244a65c4faf929249a067a51435e2be74cb39
2017-10-09 16:41:06 +02:00
Pieter Wuille c091b99379 Implement BIP173 addresses and tests 2017-09-28 16:24:30 -07:00
Pieter Wuille 1e46ebdf86 Implement {Encode,Decode}Destination without CBitcoinAddress 2017-09-23 14:45:01 -07:00
João Barbosa 8d0041e607 Remove unused GetKeyID and IsScript methods from CBitcoinAddress 2017-09-06 23:48:35 +01:00
Pieter Wuille 864cd27874 Move CBitcoinAddress to base58.cpp 2017-09-06 13:07:45 -07:00
Pieter Wuille 5c8ff0d448 Introduce wrappers around CBitcoinAddress
This patch removes the need for the intermediary Base58 type
CBitcoinAddress, by providing {Encode,Decode,IsValid}Destination
function that directly operate on the conversion between strings
and CTxDestination.
2017-09-06 13:07:45 -07:00
practicalswift c6a995e7e5 Improve readability of DecodeBase58Check(...) 2017-08-24 09:19:40 +02:00
practicalswift 64fb0ac016 Declare single-argument (non-converting) constructors "explicit"
In order to avoid unintended implicit conversions.
2017-08-16 16:33:25 +02:00
practicalswift 90d4d89230 scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal instead of the macro NULL
-BEGIN VERIFY SCRIPT-
sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h
sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp
sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp
sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp
sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp
sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp
-END VERIFY SCRIPT-
2017-08-07 07:36:37 +02:00
Jeremy Rubin 361d95265a Fix subscript[0] in base58.cpp 2017-07-08 13:33:01 -07:00
practicalswift 5a9b508279 [trivial] Add end of namespace comments 2017-05-31 22:21:25 +02:00
practicalswift dbf30ff10f [trivial] Fix typos in comments 2017-03-21 19:49:08 +01:00
isle2983 27765b6403 Increment MIT Licence copyright header year on files modified in 2016
Edited via:

$ contrib/devtools/copyright_header.py update .
2016-12-31 11:01:21 -07:00
Jiaxing Wang e892dc1268 Use prefix operator in for loop of DecodeBase58. 2016-09-16 19:13:01 +08:00
Jiaxing Wang 159ed95f74 base58: Improve DecodeBase58 performance.
Improve DecodeBase58 performance the same way as commit 3252208 did
for EncodeBase58.
2016-09-15 17:39:54 +08:00
Kaz Wesley 57704499be CBase58Data::SetString: cleanse the full vector
SetString seems to be passing the length of the wrong variable to
memory_cleanse, resulting in the last byte of the temporary buffer not being
securely erased.
2016-04-21 18:28:57 -07:00
João Barbosa 3252208cb1 Improve EncodeBase58 performance 2016-03-09 10:10:36 +00:00
MarcoFalke fa24439ff3 Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
Cory Fields 1630219d90 openssl: abstract out OPENSSL_cleanse
This makes it easier for us to replace it if desired, since it's now only in
one spot. Also, it avoids the openssl include from allocators.h, which
essentially forced openssl to be included from every compilation unit.
2015-02-15 11:34:02 -05:00
sandakersmann f914f1a746
Added "Core" to copyright headers
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19 19:55:32 +01:00
Michael Ford fa94b9d562
Convert remaining comments in /src to doxygen format
- Update comments in checkpoints to be doxygen compatible
- Update comments in checkqueue to be doxygen compatible
- Update coins to be doxygen compatible
- Fix comment typo in crypter.h
- Update licenses/copyright dates

Closes #5325 #5184 #5183 #5182
2014-11-21 14:44:21 +01:00
ENikS 6f3ae9b5df Fixing out of bounds error in GetKey() 2014-09-23 10:45:04 +02:00
Pieter Wuille 20e01b1a03 Apply clang-format on some infrequently-updated files 2014-09-19 19:21:46 +02:00
Ross Nicoll e84843c0db Broken addresses on command line no longer trigger testnet.
When passing a bitcoin: URI on the command line, invalid addresses do not incorrectly send the
user to the test network.
2014-08-30 09:39:59 +01:00
Philip Kaufmann e10dcf27b4 ensure clean and consistent "namespace" usage
- remove some missplaced ;
- ensure end of a namespace is clearly visible
- use same formatting when using namespace
2014-06-26 10:36:57 +02:00
Jeff Garzik 88df548dde base58: add paranoid return value checks 2014-06-11 23:20:37 -04:00
Pieter Wuille f6b7c644c9 Move base58.h implementation code to base58.cpp 2014-05-10 00:42:31 +02:00
Pieter Wuille b58be132c9 Replace DecodeBase58/EncodeBase58 with direct implementation.
This removes the bignum/OpenSSL dependency.

The base58 transformation code is also moved to a separate .cpp file.
2014-04-22 09:30:21 +02:00