Commit Graph

578 Commits

Author SHA1 Message Date
Tobin Harding 34ad4110f1 Remove unused error return value
This helper never returns an error, remove the `Result` return type.
Found by clippy.
2020-12-22 14:56:17 +11:00
Tobin Harding ed29f12216
Remove unnecessary return statements
Found by clippy. We don't need a `return` for the final statement.
2020-12-22 13:38:02 +11:00
Tobin Harding 4e87e6fe94
Implement is_empty method
Clippy warns of missing `is_empty`, trivially implement it by calling
through to `self.data.is_empty()`.
2020-12-22 13:37:25 +11:00
Andrew Poelstra 1a818ea099
Merge pull request #260 from tcharding/clippy
Clear clippy warnings
2020-12-22 02:18:24 +00:00
Tobin Harding 02dec3eb9b
Implement AsRef instead of custom method
Clippy emits a warning since we define a method that has the same name
as a standard trait. Implement the trait `AsRef` instead of using a
custom method.
2020-12-22 12:56:11 +11:00
Tobin Harding 3afc172096
Conditionally compile fn strlen
`strlen` is only used under certain feature flags, use `cfg` to
conditionally build it in.

Clears clippy warning.
2020-12-22 12:55:37 +11:00
Tobin Harding 617bff9df3
Conditionally include ALIGN_TO
This const is only used under specific features, use `cfg` to
conditionally build it in.

Removes clippy warning.
2020-12-22 12:54:08 +11:00
Tobin Harding f67081a01c
Allow unnecessary parentheses
Clippy emits:

	warning: unnecessary parentheses around assigned value

Add a attribute to allow unnecessary parentheses.
2020-12-22 12:53:29 +11:00
Thomas Eizinger 8b8e482f79
Run more tests in wasm
Instead of repeating ourselves in defining one big test for the wasm
target, we can override the `test` attribute with the `wasm-bindgen-test`
one and therefore automatically run all (supported) tests in wasm.

Unfortunately, wasm doesn't support catching panics yet which means we
have to disable the `test_panic_raw_ctx` test.
2020-12-22 10:30:56 +11:00
Andrew Poelstra 3151352be6
Merge pull request #233 from elichai/alloc-AlignedType2
Making sure everything is aligned correctly. Succeeder of #141
2020-12-21 21:53:38 +00:00
Elichai Turkel 0638107918
Adopt no-std tests to new preacllocated_* functions 2020-12-18 12:48:19 +02:00
Elichai Turkel 767246a282
Make preallocated use AlignedType 2020-12-18 12:48:19 +02:00
Elichai Turkel fd206ab57c
Replace use of boxes with global allocator 2020-12-18 12:48:19 +02:00
Elichai Turkel 7b99784837
Add AligneType and redo secp256k1_context_create with alloc 2020-12-18 12:48:16 +02:00
Andrew Poelstra 11e9641d21
Merge pull request #253 from apoelstra/2020-11--schnorrsig-followup
BIP 0340 followups
2020-12-09 20:31:07 +00:00
Andrew Poelstra ea027ce258 schnorrsig: change tweak_add_check to return a bool, take a fixed-length array 2020-12-09 16:49:48 +00:00
Andrew Poelstra 0ec8fab82c stop explicitly casting references to rawptrs 2020-11-30 02:47:34 +00:00
Andrew Poelstra 37049d743e schnorrsig: expose tweak_check_add API 2020-11-27 18:42:14 +00:00
Andrew Poelstra 12b0abbcf8 make `ffi::Type::new` functions all unsafe, expand documentation 2020-11-27 18:42:12 +00:00
Andrew Poelstra be9a78f39e
Merge pull request #237 from p2pderivatives/add-bip340-schnorr
Add bip340 schnorr
2020-11-27 18:04:44 +00:00
Andrew Poelstra 9083babbe2
Merge pull request #248 from justinmoon/pubkey-ordering
Implement lexigraphic ordering for PubKey
2020-11-26 03:03:17 +00:00
Justin Moon 6f8a480974 Implement lexigraphic ordering for PubKey 2020-11-25 19:27:31 -06:00
Andrew Poelstra d448cd868b
Merge pull request #252 from justinmoon/readme
Fix link in README
2020-11-25 23:06:28 +00:00
Justin Moon 6b41326f9f Fix link in README 2020-11-25 16:41:22 -06:00
Andrew Poelstra ac4541adb2
Merge pull request #250 from rust-bitcoin/2020-11--github-actions
switch from travis to github workflows
2020-11-23 21:25:21 +00:00
Andrew Poelstra 221254b641
Merge pull request #246 from vorot93/patch-2
global-context depends on rand-std
2020-11-11 21:07:56 +00:00
Andrew Poelstra 1859ddc28a switch from travis to github workflows 2020-11-10 23:58:03 +00:00
Tibo-lg 0c937d04f5 Add key::PublicKey to schnorrsig::PublicKey conversion 2020-11-10 14:15:34 +09:00
Tibo-lg 09b04560bc Add schnorrsig module 2020-11-10 13:43:34 +09:00
Tibo-lg 47b33828bc Add serde macros for public keys 2020-11-09 16:00:28 +09:00
Tibo-lg 45a4459baf Update secp256k1-sys to add schnorr/extra-keys 2020-11-09 16:00:28 +09:00
Artem Vorotnikov bc81930a89
global-context depends on rand-std 2020-11-07 01:17:22 +03:00
Tibo-lg cfb565126a Update depend folder to latest master 2020-10-12 21:35:28 +09:00
Elichai Turkel d31dcf20b0
Merge pull request #242 from TheBlueMatt/master
Use wasm sysroot for wasm32-wasi target as well
2020-10-06 20:29:56 +03:00
Matt Corallo 3a2dba0e7f Use wasm sysroot for wasm32-wasi target as well 2020-10-05 16:14:36 -04:00
Andrew Poelstra a3c7c0a424
Merge pull request #236 from rust-bitcoin/sanitizers
Add MemorySanitizer and AddressSanitizer to travis
2020-10-04 14:09:58 +00:00
Andrew Poelstra f375f6dfef
Merge pull request #232 from rust-bitcoin/2020-08-modernize
Small modernization after MSRV bump
2020-10-04 14:08:51 +00:00
Andrew Poelstra 72c85458a9
Merge pull request #239 from rust-bitcoin/real-or-random-patch-2
readme: Replace all mentions of Rust 1.22 by 1.29
2020-09-22 13:48:36 +00:00
Tim Ruffing 0a698b72ab
readme: Replace all mentions of Rust 1.22 by 1.29
Follow up on #231.
2020-09-21 16:09:33 +02:00
Elichai Turkel 9dfb329ff1
Add AddressSanitizer and MemorySanitizer support 2020-08-28 20:14:51 +03:00
Elichai Turkel fbcfc5fc88
fix travis.yml after changing Cargo.toml 2020-08-27 23:42:19 +03:00
Elichai Turkel 6511fad231
Sort Cargo.toml files 2020-08-27 22:58:00 +03:00
Elichai Turkel 48dd77e47b
Remove old deprecated blank functions 2020-08-27 22:52:16 +03:00
Elichai Turkel 9e5a351ea7
remove redundant code after MSRV bump 2020-08-27 22:51:36 +03:00
Andrew Poelstra b2e315f154
Merge pull request #231 from rust-bitcoin/2020-08-msrv-1.29
Update MSRV to 1.29; increase version to 0.19 and -sys version to 0.3
2020-08-27 16:27:38 +00:00
Andrew Poelstra 19f5138925 Update MSRV to 1.29; increase version to 0.19 and -sys version to 0.3 2020-08-27 14:18:06 +00:00
Elichai Turkel ac9295c38a
Merge pull request #230 from rust-bitcoin/2020-08-secp-0.18.0
increase version to 0.18.0
2020-08-27 11:48:25 +03:00
Andrew Poelstra 060648775e bump version to 0.18.0 2020-08-26 21:16:22 +00:00
Elichai Turkel c69d43d84e Update key.rs to use the new seckey functions 2020-08-26 21:16:19 +00:00
Andrew Poelstra 51ca1557ae
Merge pull request #229 from rust-bitcoin/2020-secp-sys-0.2.0
update secp-sys to 0.2.0
2020-08-26 21:11:32 +00:00