Skip to content

Commit

Permalink
Merge bitcoin-core/gui#116: Fix unreasonable default size of the main…
Browse files Browse the repository at this point in the history
… window without loaded wallets

7b2e42e qt: Add WalletFrame::sizeHint (Hennadii Stepanov)

Pull request description:

  This PR fixes a bug in master (d67883d) and in 0.20.1 that could be easily reproduced with
  ```
  $ src/qt/bitcoin-qt -regtest -resetguisettings -nowallet
  ```

  ![Screenshot from 2020-10-25 21-21-27](https://user-images.githubusercontent.com/32963518/97117179-b1800100-170a-11eb-87c9-3120d39b9455.png)
  ![Screenshot from 2020-10-25 21-23-32](https://user-images.githubusercontent.com/32963518/97117186-b644b500-170a-11eb-8b5d-234ff7205003.png)

  **With this PR:**

  ![Screenshot from 2020-10-25 21-20-35](https://user-images.githubusercontent.com/32963518/97117226-f441d900-170a-11eb-8d66-98b7718a2bb1.png)
  ![Screenshot from 2020-10-25 21-23-03](https://user-images.githubusercontent.com/32963518/97117232-f99f2380-170a-11eb-85ed-c7b5ece926b2.png)

  ---

  Fix #104
  Fix #113

  This PR is an alternative to #107 without [hard-coding a size in pixels](bitcoin-core/gui#107 (comment)).

ACKs for top commit:
  jonasschnelli:
    Tested ACK 7b2e42e - I can confirm this fixes #104 (Ubuntu 20.04 - HiDPI 200%).

Tree-SHA512: eb0692dbeb3befdeecca0e41534c9783eab6637c14cc4f170ee42619235884f9354f8d22a10c20c08cc89dc5340a60b7dfa2523c12e64b3386b3fd2c6d5f934e
  • Loading branch information
jonasschnelli authored and sidhujag committed Oct 27, 2020
1 parent d4325b9 commit 63d4f53
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/functional/mining_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
CBlock,
CBlockHeader,
BLOCK_HEADER_SIZE,
# SYSCOIN
CHAIN_ID,
VERSION_CHAIN_START,
)
from test_framework.p2p import P2PDataStore
from test_framework.test_framework import SyscoinTestFramework
Expand Down Expand Up @@ -60,12 +63,16 @@ def mine_chain(self):
assert_equal(mining_info['currentblockweight'], 4000)

self.log.info('test blockversion')
self.restart_node(0, extra_args=['-mocktime={}'.format(t), '-blockversion=1337'])
self.restart_node(0, extra_args=['-mocktime={}'.format(t), '-blockversion=255'])
self.connect_nodes(0, 1)
assert_equal(1337, self.nodes[0].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS)['version'])
# SYSCOIN
assert_equal(255 + CHAIN_ID * VERSION_CHAIN_START, self.nodes[0].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS)['version'])
self.restart_node(0, extra_args=['-mocktime={}'.format(t)])
self.connect_nodes(0, 1)
assert_equal(VERSIONBITS_TOP_BITS + (1 << VERSIONBITS_DEPLOYMENT_TESTDUMMY_BIT), self.nodes[0].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS)['version'])
# SYSCOIN
# n = VERSIONBITS_TOP_BITS + (1 << VERSIONBITS_DEPLOYMENT_TESTDUMMY_BIT)
n = 4 + n + CHAIN_ID * VERSION_CHAIN_START
assert_equal(n, self.nodes[0].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS)['version'])
self.restart_node(0)
self.connect_nodes(0, 1)

Expand Down

0 comments on commit 63d4f53

Please sign in to comment.