General cleanup for the docs

This commit is contained in:
Alekos Filini
2020-08-31 10:49:44 +02:00
parent d61e974dbe
commit c0867a6adc
23 changed files with 305 additions and 201 deletions

View File

@@ -22,6 +22,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
use std::fmt;
use bitcoin::Script;
use crate::descriptor::HDKeyPaths;
@@ -35,6 +37,14 @@ pub enum AddressValidatorError {
InvalidScript,
}
impl fmt::Display for AddressValidatorError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{:?}", self)
}
}
impl std::error::Error for AddressValidatorError {}
pub trait AddressValidator {
fn validate(
&self,
@@ -81,7 +91,7 @@ mod test {
let addr = testutils!(@external descriptors, 10);
wallet
.create_tx(TxBuilder::from_addressees(vec![(addr, 25_000)]))
.create_tx(TxBuilder::with_recipients(vec![(addr, 25_000)]))
.unwrap();
}
}