46 Commits

Author SHA1 Message Date
fuyangpengqi
d6a84bcbe1 chore: remove redundant words
Signed-off-by: fuyangpengqi <995764973@qq.com>
2025-02-26 15:32:12 +08:00
chromatic
96483e2551 Change Bitcoin to Dogecoin in QA output strings 2023-08-31 10:44:48 -07:00
Pieter Wuille
84c93a7fc8
Swap out hashlib.ripemd160 for own implementation
Cherry-picked from: 5b559dc7e
2022-07-27 16:45:38 -07:00
Patrick Lodder
87bd548807
Update copyright headers in files
Detected changes since fork from Bitcoin Core 0.14 and either
updated the Dogecoin Core developer copyright, or added a line
for it.

Script can be found at:

https://gist.github.com/patricklodder/210a449896ece9ca4a8f872328198e3f
2022-07-16 20:18:50 +02:00
Patrick Lodder
ae38534692
qa: add transaction download test
Tests 5 scenarios for transaction download scheduling:

1. Whether eventually, after a series of timeouts, all our peers
   that announced a transaction are sent a getdata request
2. Whether outbound peers are prioritized over inbound peers when
   a getdata request takes longer than optimal
3. That we honor the maximum in-flight capacity, that this is on
   a per-peer basis and that it resets itself after timeout
4. That when we have an inflight getdata request when a peer
   disconnects, we recover after the initial 30 second timeout
   and fetch the transaction from another peer
5. That we recover after a peer sends us a notfound message for
   a tx we had an inflight getdata request for.
2022-07-12 02:57:00 +02:00
Old Dip Tracker
b3beca6cc4
Merge pull request #2758 from patricklodder/1.14.6-maxlocsz
net: Introduce a maximum size for locators
2022-06-17 08:05:37 -04:00
Patrick Lodder
fe90690fb2
qa: support addr message time field in mininode.py
Adds the time field to addr messages from protocol version 31402,
but serialize/deserialize without it for version messages. This
allows us to test p2p addr messages.

See src/version.h and c891967b
2022-06-06 11:59:06 +02:00
Patrick Lodder
c93ea51273
qa: Add p2p_invalid_locator test
Adds a custom mininode implementation to test connects and
disconnects based on the number of allowed locators

Inspired by: fa85c985
Original Author: MarcoFalke <falke.marco@gmail.com>
2021-12-17 19:02:42 -04:00
Patrick Lodder
caf26b77ab
fixup p2p-acceptblock and mininode to test disconnects
without partially backporting a new testframework.

- Adds a condition to NodeConn that when asyncore calls handle_read
  without any data, this must be a disconnect and closes the socket
- Adds a little loop in the p2p-acceptblock client that waits for
  the socket to be in a closed state
- Makes expected disconnects non-optional in p2p-acceptblock
- Syncs the test descriptions and outputs with reality
2021-08-17 20:15:30 +02:00
Michi Lumin
575f734eec Initial back end framework to separate wallet and relay fees + dust. 2021-07-30 16:07:22 -06:00
Patrick Lodder
e896e90e6e
rpc-tests: revert from litecoin_scrypt to ltc_scrypt
This reflects the dependency installed in the dep script at
qa/pull-tester/install-deps.sh
2020-07-22 13:47:33 +02:00
Ross Nicoll
b6b5ee7502 Update RPC tests for Dogecoin (#1431)
* Make most of the RPC tests pass
* Add AUXPoW rpc tests
- Tests the auxpow rpc interface `getauxblock`
- Tests consensus constraints for auxpow:
  - Minimum block height
  - Valid scrypt proof of work
  - Foreign chain ID
2018-09-19 22:11:47 +01:00
Matt Corallo
b436f92f72 qa: Expose on-connection to mininode listeners 2017-02-08 12:05:13 -05:00
Matt Corallo
8aaba7a6b7 qa: mininode learns when a socket connects, not its first action 2017-02-08 12:05:13 -05:00
BtcDrak
09dc4064ac Make test constant consistent with consensus.h 2016-11-21 21:30:53 +00:00
jnewbery
e5d682faa3 Fix mininode version message format 2016-11-09 02:34:30 +00:00
Suhas Daftuar
422fac649f [qa] Add support for compactblocks v2 to mininode 2016-10-04 19:10:49 +02:00
Suhas Daftuar
f5b9b8f437 [qa] Fix bug in mininode witness deserialization
Also improve tx printing
2016-10-04 19:10:49 +02:00
MarcoFalke
fa666094cf [qa] mininode: Only allow named args in wait_until 2016-10-02 12:21:14 +02:00
Suhas Daftuar
b5fd666984 [qa] Fix race condition in p2p-compactblocks test
Also fix a bug in the sync_with_ping() helper function
2016-09-30 20:54:30 -04:00
Suhas Daftuar
9a22a6c089 Add support for compactblocks to mininode 2016-07-29 09:41:58 -04:00
Suhas Daftuar
a8689fdf8e Tests: refactor compact size serialization in mininode 2016-07-29 09:41:58 -04:00
Bob McElrath
36ae37a9f9 Rename CTxinWitness -> CTxInWitness 2016-07-06 19:46:46 -04:00
Suhas Daftuar
330b0f31ee [qa] p2p segwit tests
mininode now supports witness transactions/blocks, blocktools
has a helper for adding witness commitments to blocks, and script
has a function to calculate hashes for signature under sigversion
1, used by segwit.

Py3 conversion by Marco Falke

Test to make sure upgraded nodes don't ask for non-wit blocks by
Gregory Sanders.
2016-06-22 15:43:02 +02:00
MarcoFalke
facb6c0bf8 [qa] mininode: fail on send_message instead of silent return 2016-06-17 13:31:31 +02:00
mrbandrews
291f8aa5da Continuing port of java comptool 2016-06-02 14:42:09 -04:00
mrbandrews
8c9e681ff8 Tests: Rework blockstore to avoid re-serialization. 2016-05-31 14:21:40 -04:00
MarcoFalke
fa389d4edc [qa] Switch to py3 2016-05-05 15:43:37 +02:00
MarcoFalke
5555528b47 [qa] mininode: Unfiddle strings into bytes 2016-04-23 20:20:46 +02:00
Suhas Daftuar
807fa47a1e Tests: Fix deserialization of reject messages
Assume that reject messages for blocks or transactions due to reason
REJECT_MALFORMED will not include the hash of the block or tx being rejected.
2016-04-20 09:27:26 -04:00
MarcoFalke
faa41ee204 [qa] py2: Unfiddle strings into bytes explicitly 2016-04-10 20:35:57 +02:00
MarcoFalke
444480649f [qa] mininode: Combine struct.pack format strings 2016-04-02 11:48:07 +02:00
MarcoFalke
faaa3c9b65 [qa] mininode: Catch exceptions in got_data 2016-04-01 21:23:49 +02:00
MarcoFalke
fa2cea163b [qa] rpc-tests: Properly use integers, floats 2016-04-01 21:23:30 +02:00
MarcoFalke
fa524d9ddb [qa] Use python2/3 syntax 2016-03-31 18:35:17 +02:00
Alex Morcos
b536a6fc83 Add p2p test for feefilter 2016-03-21 10:46:25 -04:00
Alex Morcos
5fa66e4682 Create SingleNodeConnCB class for RPC tests 2016-03-21 10:46:25 -04:00
MarcoFalke
fad8cfb893 [qa] mininode: Add and use CONSTs 2016-03-14 16:45:18 +01:00
Wladimir J. van der Laan
80d1f2e483
Merge #7184: Implement SequenceLocks functions for BIP 68
b043c4b fix sdaftuar's nits again (Alex Morcos)
a51c79b Bug fix to RPC test (Alex Morcos)
da6ad5f Add RPC test exercising BIP68 (mempool only) (Suhas Daftuar)
c6c2f0f Implement SequenceLocks functions (Alex Morcos)
2016-02-12 17:03:46 +01:00
Suhas Daftuar
da6ad5f684 Add RPC test exercising BIP68 (mempool only) 2016-02-10 15:35:33 -05:00
mrbandrews
7689041c03 [rpc-tests] Change solve() to use rehash 2016-02-04 14:36:11 -05:00
Suhas Daftuar
82a0ce09b4 Add race-condition debugging tool to mininode 2016-01-07 09:22:20 -05:00
Suhas Daftuar
9b41a5fba2 Add more tests to p2p-fullblocktest 2015-12-18 05:39:31 -05:00
Wladimir J. van der Laan
2f601d215d test: remove necessity to call create_callback_map
Remove necessity to call create_callback_map (as well as the function
itself) from the Python P2P test framework. Invoke the appropriate
methods directly.

- Easy to forget to call it and wonder why it doesn't work
- Simplifies the code
- This makes it easier to handle new messages in subclasses
2015-12-04 13:15:59 +01:00
Suhas Daftuar
50262d8953 Allow block announcements with headers
This replaces using inv messages to announce new blocks, when a peer requests
(via the new "sendheaders" message) that blocks be announced with headers
instead of inv's.

Since headers-first was introduced, peers send getheaders messages in response
to an inv, which requires generating a block locator that is large compared to
the size of the header being requested, and requires an extra round-trip before
a reorg can be relayed.  Save time by tracking headers that a peer is likely to
know about, and send a headers chain that would connect to a peer's known
headers, unless the chain would be too big, in which case we revert to sending
an inv instead.

Based off of @sipa's commit to announce all blocks in a reorg via inv,
which has been squashed into this commit.

Rebased-by: Pieter Wuille
2015-11-29 11:59:23 +01:00
Jonas Schnelli
64937fe51a [QA] restructure rpc tests directory
* move non-test classes to subdir `test-framework`
2015-05-18 15:25:45 +02:00