# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-bitcoin = "0.24"
+bitcoin = "0.26"
lightning = { version = "0.0.12", path = "../lightning", features = ["allow_wallclock_use"] }
lightning-persister = { version = "0.0.1", path = "../lightning-persister" }
[dependencies]
afl = { version = "0.4", optional = true }
lightning = { path = "../lightning", features = ["fuzztarget"] }
-bitcoin = { version = "0.24", features = ["fuzztarget"] }
+bitcoin = { version = "0.26", features = ["fuzztarget"] }
hex = "0.3"
honggfuzz = { version = "0.5", optional = true }
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git", optional = true }
rpc-client = [ "serde", "serde_json", "chunked_transfer" ]
[dependencies]
-bitcoin = "0.24"
+bitcoin = "0.26"
lightning = { version = "0.0.12", path = "../lightning" }
tokio = { version = "1.0", features = [ "io-util", "net" ], optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
,"cdylib"]
[dependencies]
-bitcoin = "0.24"
+bitcoin = "0.26"
lightning = { version = "0.0.12", path = "../lightning" }
# We eventually want to join the root workspace, but for now, the bindings generation is
InvalidSecretKey,
InvalidRecoveryId,
InvalidTweak,
+ TweakCheckFailed,
NotEnoughMemory,
- CallbackPanicked,
}
impl Secp256k1Error {
pub(crate) fn from_rust(err: SecpError) -> Self {
SecpError::InvalidSecretKey => Secp256k1Error::InvalidSecretKey,
SecpError::InvalidRecoveryId => Secp256k1Error::InvalidRecoveryId,
SecpError::InvalidTweak => Secp256k1Error::InvalidTweak,
+ SecpError::TweakCheckFailed => Secp256k1Error::TweakCheckFailed,
SecpError::NotEnoughMemory => Secp256k1Error::NotEnoughMemory,
}
}
"""
[dependencies]
-bitcoin = "0.24"
+bitcoin = "0.26"
lightning = { version = "0.0.12", path = "../lightning" }
tokio = { version = "1.0", features = [ "io-util", "macros", "rt", "sync", "net", "time" ] }
"""
[dependencies]
-bitcoin = "0.24"
+bitcoin = "0.26"
lightning = { version = "0.0.12", path = "../lightning" }
libc = "0.2"
winapi = { version = "0.3", features = ["winbase"] }
[dev-dependencies.bitcoin]
-version = "0.24"
+version = "0.26"
features = ["bitcoinconsensus"]
[dev-dependencies]
unstable = []
[dependencies]
-bitcoin = "0.24"
+bitcoin = "0.26"
hex = { version = "0.3", optional = true }
regex = { version = "0.1.80", optional = true }
[dev-dependencies.bitcoin]
-version = "0.24"
+version = "0.26"
features = ["bitcoinconsensus"]
[dev-dependencies]
//! instead of having a rather-separate lightning appendage to a wallet.
#![cfg_attr(not(any(feature = "fuzztarget", feature = "_test_utils")), deny(missing_docs))]
-#![forbid(unsafe_code)]
+#![cfg_attr(not(any(test, feature = "fuzztarget", feature = "_test_utils")), forbid(unsafe_code))]
// In general, rust is absolutely horrid at supporting users doing things like,
// for example, compiling Rust code for real environments. Disable useless lints
use bitcoin::secp256k1::ffi::Signature as FFISignature;
use bitcoin::secp256k1::Signature;
msgs::ChannelUpdate {
- signature: Signature::from(FFISignature::new()),
+ signature: Signature::from(unsafe { FFISignature::new() }),
contents: msgs::UnsignedChannelUpdate {
chain_hash: BlockHash::hash(&vec![0u8][..]),
short_channel_id: 0,
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), ::std::io::Error> {
match self.consensus_encode(WriterWriteAdaptor(writer)) {
Ok(_) => Ok(()),
- Err(consensus::encode::Error::Io(e)) => Err(e),
- Err(_) => panic!("We shouldn't get a consensus::encode::Error unless our Write generated an std::io::Error"),
+ Err(e) => Err(e),
}
}
}
excess_data: Vec::new(),
};
- msgs::ChannelAnnouncement {
- node_signature_1: Signature::from(FFISignature::new()),
- node_signature_2: Signature::from(FFISignature::new()),
- bitcoin_signature_1: Signature::from(FFISignature::new()),
- bitcoin_signature_2: Signature::from(FFISignature::new()),
- contents: unsigned_ann,
+ unsafe {
+ msgs::ChannelAnnouncement {
+ node_signature_1: Signature::from(FFISignature::new()),
+ node_signature_2: Signature::from(FFISignature::new()),
+ bitcoin_signature_1: Signature::from(FFISignature::new()),
+ bitcoin_signature_2: Signature::from(FFISignature::new()),
+ contents: unsigned_ann,
+ }
}
}
use bitcoin::secp256k1::ffi::Signature as FFISignature;
let network = Network::Testnet;
msgs::ChannelUpdate {
- signature: Signature::from(FFISignature::new()),
+ signature: Signature::from(unsafe { FFISignature::new() }),
contents: msgs::UnsignedChannelUpdate {
chain_hash: genesis_block(network).header.block_hash(),
short_channel_id: short_chan_id,