Commit Graph

603 Commits

Author SHA1 Message Date
Maximilian Krüger 53e02f4430 add docstrings 2018-02-14 12:13:40 +01:00
Maximilian Krüger 107141e0b7 remove unused imports 2018-02-14 12:13:11 +01:00
Maximilian Krüger d7feac802f verifySignatures -> hasEnoughValidSignatures and make it return bool 2018-02-13 17:18:24 +01:00
Maximilian Krüger 59d354bde0 test: withdraw should succeed if gas price != requested gas price but sender is receiver 2018-02-13 16:51:24 +01:00
Maximilian Krüger 845ab3359c fix syntax error 2018-02-13 16:38:28 +01:00
Maximilian Krüger 22e9b5d695 add test that fails when gas price != requested gas price 2018-02-13 16:13:58 +01:00
Maximilian Krüger 0de0384509 fix test that submitting signature with too short msg fails 2018-02-13 16:09:57 +01:00
Maximilian Krüger 50e63db3cd improve truffle tests for ForeignBridge.transferToHome 2018-02-13 15:48:10 +01:00
Maximilian Krüger 85a2e10fcb remove redundance require. signatures of wrong length don't pass the address recovery above 2018-02-13 15:47:17 +01:00
Maximilian Krüger 4e56c9ec65 require value to be greater estimated wei cost for relay 2018-02-13 15:46:51 +01:00
Maximilian Krüger 61bb0b3ffa fix truffle tests that failed because of wrong number of args 2018-02-13 15:11:24 +01:00
Maximilian Krüger 52652cb9fc add truffle test: should fail to transfer more than balance home 2018-02-13 14:44:55 +01:00
Maximilian Krüger 2165513fdd tests for Helpers.verifySignatures 2018-02-13 14:26:11 +01:00
Maximilian Krüger c97785862b remove unused function param 2018-02-13 14:25:54 +01:00
Maximilian Krüger bd20896deb use `accounts` in more truffle tests 2018-02-13 14:25:43 +01:00
Maximilian Krüger 76c85e6f84 bridge.sol: add HelpersTest.verifySignatures 2018-02-13 14:25:11 +01:00
Maximilian Krüger a1dc3bcb05 bridge.sol: improve docstring for verifySignatures 2018-02-13 14:25:00 +01:00
Maximilian Krüger edd691672a fix broken truffle tests that passed because error handling was broken 2018-02-13 11:01:05 +01:00
Maximilian Krüger ff9f7bb7f6 fix error handling in truffle tests
only catch/ignore such errors that we want to happen.
propagate all other errors correctly and don't ignore them.
2018-02-13 11:00:09 +01:00
Maximilian Krüger 49c7a11fdf tests: fix indentation 2018-02-13 10:57:07 +01:00
Maximilian Krüger d9090d9cde add ignoreExpectedError to test helpers 2018-02-13 10:29:21 +01:00
Maximilian Krüger d42f4b9590 Cargo.lock: use newest cargo which doesn't add `root`
addresses https://github.com/paritytech/parity-bridge/pull/114#discussion_r167784460
2018-02-13 09:23:48 +01:00
Maximilian Krüger 12eea5053f quickcheck test that MessageToMainnet roundtrips from/to bytes and payload 2018-02-12 19:32:09 +01:00
Maximilian Krüger 1de9a53d1e slightly simplify test for signature roundtrips 2018-02-12 19:31:46 +01:00
Maximilian Krüger dfb7fef654 bridge/src/signature.rs: 100% test coverage with quickcheck 2018-02-12 19:14:57 +01:00
Maximilian Krüger 4c63d4469e test/home: reduce homeGasPrice everywhere to keep coverage test from failing 2018-02-12 17:55:07 +01:00
Maximilian Krüger 71fed91200 test/home: trying lower gas price in to not fail when computing coverage 2018-02-12 17:39:56 +01:00
Maximilian Krüger e667321760 truffle tests fail on travis only :/ trying something 2018-02-12 17:17:05 +01:00
Maximilian Krüger a3740a5672 test/foreign: add missing variable homeGasPrice 2018-02-12 16:39:59 +01:00
Maximilian Krüger 5b446b48a3 remove `use` of symbols that no longer exist 2018-02-12 16:35:36 +01:00
Maximilian Krüger 3cc6b29438 tests/tests/withdraw_confirm.rs: refactor: replace opaque data strings by something easily modifiable (json, ethabi use) 2018-02-12 16:15:19 +01:00
Maximilian Krüger 8ab895664a integration-tests: set home_gas_price to 0 to make it pass for now 2018-02-12 15:35:06 +01:00
Maximilian Krüger c887668eda remove tests for withdraw confirm payloads
- they test against raw hex strings
  - hard to modify
  - if we me it easier to modify by using ethabi to assemble data
    the tests essentially become useless
- logic should already be covered by both integration test and RPC tests
2018-02-12 15:24:23 +01:00
Maximilian Krüger 4a3b4ba1f0 remove test for function that doesn't exist anymore 2018-02-12 15:23:41 +01:00
Maximilian Krüger d7928c22cc tests/tests/withdraw_relay.rs: refactor: replace opaque data strings by something easily modifiable (json, ethabi use) 2018-02-12 15:09:38 +01:00
Maximilian Krüger be18c96d31 remove conversion (web3 -> ethabi) that is no longer needed (ethereum-types) 2018-02-12 14:58:14 +01:00
Maximilian Krüger 87c57c9963 extract code dealing with signatures into module 2018-02-12 14:57:57 +01:00
Maximilian Krüger b28944511c message_to_mainnet.rs: fix from_bytes (respect little endian) 2018-02-12 14:55:02 +01:00
Maximilian Krüger ed060ae85b message_to_mainnet.rs: remove to_hex, add to_payload 2018-02-12 14:54:46 +01:00
Maximilian Krüger 78c6cf4472 bridge/src/helpers.rs: no longer needed 2018-02-12 14:51:16 +01:00
Maximilian Krüger 465e2d88e8 update Cargo.lock 2018-02-12 14:51:02 +01:00
Maximilian Krüger 999a4a7a7e use ethereum_types 0.2 everywhere 2018-02-12 14:50:44 +01:00
Maximilian Krüger 42993089f5 adapt to ethabi version bump 2018-02-12 10:11:39 +01:00
Maximilian Krüger 9df576739b tests/Cargo.toml: add more required deps 2018-02-09 09:44:55 +01:00
Maximilian Krüger b3760ec322 tests/src/lib.rs: change order of assertions to see most meaningful failure first 2018-02-09 09:44:55 +01:00
Maximilian Krüger e3bbe9eda3 truffle test for message: should extract homeGasPrice 2018-02-09 09:44:55 +01:00
Maximilian Krüger 88a117a5ba fix test helpers.createMessage: allow setting of homeGasPrice 2018-02-09 09:44:55 +01:00
Maximilian Krüger 467c5dc2f2 remove contract code that dealt with removed ignoring of insufficient value withdraws 2018-02-09 09:44:55 +01:00
Maximilian Krüger 5000043930 extract code dealing with Withdraw message
remove ignoring of messages with insufficient value
because no longer needed.

use user specified gas price on withdraw.
2018-02-09 09:44:55 +01:00
Maximilian Krüger 793029974d tests/tests/log_stream.rs: &str -> json! 2018-02-09 09:41:46 +01:00