Skip to content

Commit 303d8e4

Browse files
committed
Rename script_pub_key to script_pubkey
Rename script_pub_key to script_pubkey
1 parent 2aede02 commit 303d8e4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

client/src/client_sync/v17/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ pub struct ImportMultiRequest {
257257
pub desc: Option<String>, // from core v18 onwards.
258258
/// Type of scriptPubKey (string for script, json for address). Should not be provided if using descriptor.
259259
#[serde(rename = "scriptPubKey", skip_serializing_if = "Option::is_none")]
260-
pub script_pub_key: Option<ImportMultiScriptPubKey>,
260+
pub script_pubkey: Option<ImportMultiScriptPubKey>,
261261
/// Creation time of the key expressed in UNIX epoch time, or the string "now" to substitute the current synced blockchain time.
262262
pub timestamp: ImportMultiTimestamp,
263263
}

integration_test/tests/wallet.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,14 @@ fn wallet__import_multi() {
365365
// to ensure import succeeds, since the wallet already knows the key.
366366
let req1 = ImportMultiRequest {
367367
desc: None,
368-
script_pub_key: Some(ImportMultiScriptPubKey::Script(dummy_script_hex.to_string())),
368+
script_pubkey: Some(ImportMultiScriptPubKey::Script(dummy_script_hex.to_string())),
369369
timestamp: ImportMultiTimestamp::Now,
370370
};
371371

372372
// Uses an address (valid): success - false, with JSON-RPC error.
373373
let req2 = ImportMultiRequest {
374374
desc: None,
375-
script_pub_key: Some(ImportMultiScriptPubKey::Address {
375+
script_pubkey: Some(ImportMultiScriptPubKey::Address {
376376
address: addr.to_string(),
377377
}),
378378
timestamp: ImportMultiTimestamp::Now,
@@ -383,7 +383,7 @@ fn wallet__import_multi() {
383383
// NOTE: Works only for v18 onwards, as v17 doesn't support descriptors.
384384
let req3 = ImportMultiRequest {
385385
desc: Some(dummy_desc.to_string()),
386-
script_pub_key: None,
386+
script_pubkey: None,
387387
timestamp: ImportMultiTimestamp::Time(1_700_000_000),
388388
};
389389

types/src/v17/util/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl std::error::Error for CreateMultisigError {
4343
pub enum ValidateAddressError {
4444
/// Conversion of the `address` field failed.
4545
Address(address::ParseError),
46-
/// Conversion of the `script_pub_key` field failed.
46+
/// Conversion of the `script_pubkey` field failed.
4747
ScriptPubkey(hex::HexToBytesError),
4848
/// The `witness_version` field's value was too big for a u8.
4949
WitnessVersionValue(i64),
@@ -62,7 +62,7 @@ impl fmt::Display for ValidateAddressError {
6262
match *self {
6363
E::Address(ref e) => write!(f, "conversion of the `address` field failed: {}", e),
6464
E::ScriptPubkey(ref e) =>
65-
write!(f, "conversion of the `script_pub_key` field failed: {}", e),
65+
write!(f, "conversion of the `script_pubkey` field failed: {}", e),
6666
E::WitnessVersionValue(v) => write!(f, "invalid witness version number: {}", v),
6767
E::WitnessVersion(ref e) =>
6868
write!(f, "conversion of the `witness_version` field failed: {}", e),

0 commit comments

Comments
 (0)