Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: Update tinyformat #212

Merged
merged 2 commits into from Jul 6, 2017
Merged

Conversation

dagurval
Copy link
Member

@dagurval dagurval commented Jul 3, 2017

No description provided.

Updates `tinyformat.h` to commit
c42f/tinyformat@3a33bbf upstream.

Makes sure that our local changes are kept:

- #3767 1b8fd35 Make tinyformat errors raise an exception instead of assert()ing
- #4735 9b6d4c5 Move strprintf define to tinyformat.h
- #4748 6e5fd00 include stdexcept (for std::exception)
- #8000 9eaa0afa6ec5d3dd01e4d01121314ef51f2bc305 force USE_VARIADIC_TEMPLATES
- Add `std::string format(const std::string &fmt...` added this
  at the time, as we want to be able to do `strprintf(_(...), ...)`

Inspired by #8264.
Changes in tinyformat, recently imported from upstream have made the
zero-argument versions of formatting functions unnecessary. Remove them.

This is a slight semantic change: `%` characters in the zero-argument
call are now regarded and need to be escaped. As for as I know, the only
use of this is in `main.cpp`.
@dgenr8
Copy link
Member

dgenr8 commented Jul 6, 2017

This is bitcoin/bitcoin#8274
utACK

@dgenr8 dgenr8 merged commit 3aac8b0 into bitcoinxt:master Jul 6, 2017
@dgenr8
Copy link
Member

dgenr8 commented Jul 6, 2017

Doh. rawtransactions.py is failing with

EXCEPTION: St13runtime_error       
tinyformat: Too many conversion specifiers in format string       
bitcoin in ProcessMessages()       

Assertion failed: Block sync failed
  File "/home/dgenr8/bitcoinxt/qa/rpc-tests/test_framework/test_framework.py", line 144, in main
    self.run_test()
  File "/home/dgenr8/bitcoinxt/qa/rpc-tests/rawtransactions.py", line 44, in run_test
    self.sync_all()
  File "/home/dgenr8/bitcoinxt/qa/rpc-tests/test_framework/test_framework.py", line 94, in sync_all
    sync_blocks(self.nodes)
  File "/home/dgenr8/bitcoinxt/qa/rpc-tests/test_framework/util.py", line 100, in sync_blocks
    raise AssertionError("Block sync failed")
Stopping nodes
Cleaning up
Failed
Traceback (most recent call last):
  File "./rpc-tests.py", line 250, in <module>
    runtests()
  File "./rpc-tests.py", line 150, in runtests
    rpcTestDir + testScripts[i] + flags, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/home/dgenr8/bitcoinxt/qa/rpc-tests/rawtransactions.py --srcdir /home/dgenr8/bitcoinxt/src  ' returned non-zero exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants