projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add version and TLV suffix for more user-facing "major" structs
[rust-lightning]
/
lightning
/
src
/
util
/
test_utils.rs
diff --git
a/lightning/src/util/test_utils.rs
b/lightning/src/util/test_utils.rs
index 153f2f28eed11ffe7e55536c98c191714edb6443..c167c3412637408ae4008921ee9360dfc9b7f932 100644
(file)
--- a/
lightning/src/util/test_utils.rs
+++ b/
lightning/src/util/test_utils.rs
@@
-32,13
+32,14
@@
use bitcoin::network::constants::Network;
use bitcoin::hash_types::{BlockHash, Txid};
use bitcoin::secp256k1::{SecretKey, PublicKey, Secp256k1, Signature};
use bitcoin::hash_types::{BlockHash, Txid};
use bitcoin::secp256k1::{SecretKey, PublicKey, Secp256k1, Signature};
+use bitcoin::secp256k1::recovery::RecoverableSignature;
use regex;
use regex;
-use
std
::time::Duration;
+use
core
::time::Duration;
use std::sync::{Mutex, Arc};
use std::sync::{Mutex, Arc};
-use
std
::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
-use
std
::{cmp, mem};
+use
core
::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
+use
core
::{cmp, mem};
use std::collections::{HashMap, HashSet, VecDeque};
use chain::keysinterface::InMemorySigner;
use std::collections::{HashMap, HashSet, VecDeque};
use chain::keysinterface::InMemorySigner;
@@
-75,6
+76,7
@@
impl keysinterface::KeysInterface for OnlyReadsKeysInterface {
fn read_chan_signer(&self, reader: &[u8]) -> Result<Self::Signer, msgs::DecodeError> {
EnforcingSigner::read(&mut std::io::Cursor::new(reader))
}
fn read_chan_signer(&self, reader: &[u8]) -> Result<Self::Signer, msgs::DecodeError> {
EnforcingSigner::read(&mut std::io::Cursor::new(reader))
}
+ fn sign_invoice(&self, _invoice_preimage: Vec<u8>) -> Result<RecoverableSignature, ()> { unreachable!(); }
}
pub struct TestChainMonitor<'a> {
}
pub struct TestChainMonitor<'a> {
@@
-483,6
+485,10
@@
impl keysinterface::KeysInterface for TestKeysInterface {
disable_revocation_policy_check: self.disable_revocation_policy_check,
})
}
disable_revocation_policy_check: self.disable_revocation_policy_check,
})
}
+
+ fn sign_invoice(&self, invoice_preimage: Vec<u8>) -> Result<RecoverableSignature, ()> {
+ self.backing.sign_invoice(invoice_preimage)
+ }
}
}
@@
-618,8
+624,8
@@
impl OnRegisterOutput {
}
}
}
}
-impl
std
::fmt::Debug for OnRegisterOutput {
- fn fmt(&self, f: &mut
std::fmt::Formatter<'_>) -> std
::fmt::Result {
+impl
core
::fmt::Debug for OnRegisterOutput {
+ fn fmt(&self, f: &mut
core::fmt::Formatter<'_>) -> core
::fmt::Result {
f.debug_struct("OnRegisterOutput")
.field("outpoint", &self.outpoint())
.field("script_pubkey", self.script_pubkey())
f.debug_struct("OnRegisterOutput")
.field("outpoint", &self.outpoint())
.field("script_pubkey", self.script_pubkey())