nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: wizardsardine/liana
Pull request #501 (2023-05-12 11:24:53)

daemon: release rc1 of 1.0


Patch:
diff --git a/contrib/release/release.sh b/contrib/release/release.sh
index 7cbfcfa8..629f61bf 100755
--- a/contrib/release/release.sh
+++ b/contrib/release/release.sh
@@ -7,7 +7,7 @@
 
 set -ex
 
-VERSION="${VERSION:-"1.0"}"
+VERSION="${VERSION:-"1.0rc1"}"
 LIANA_PREFIX="liana-$VERSION"
 LINUX_DIR_NAME="$LIANA_PREFIX-x86_64-linux-gnu"
 LINUX_ARCHIVE="$LINUX_DIR_NAME.tar.gz"
diff --git a/src/lib.rs b/src/lib.rs
index a08c256a..1643cf82 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -73,7 +73,7 @@ pub struct Version {
 
 impl fmt::Display for Version {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}.{}.{}-dev", self.major, self.minor, self.patch)
+        write!(f, "{}.{}.{}rc1", self.major, self.minor, self.patch)
     }
 }
 


Test patch:
diff --git a/tests/test_rpc.py b/tests/test_rpc.py
index 4d1cf06b..eae63716 100644
--- a/tests/test_rpc.py
+++ b/tests/test_rpc.py
@@ -20,7 +20,7 @@ from test_framework.utils import (
 
 def test_getinfo(lianad):
     res = lianad.rpc.getinfo()
-    assert res["version"] == "1.0.0-dev"
+    assert res["version"] == "1.0.0rc1"
     assert res["network"] == "regtest"
     wait_for(lambda: lianad.rpc.getinfo()["block_height"] == 101)
     res = lianad.rpc.getinfo()
Repository: wizardsardine/liana
Pull request #628 (2023-08-22 14:45:20)

daemon bin: remove help detection on the command line


Patch:
diff --git a/src/bin/daemon.rs b/src/bin/daemon.rs
index 0856cfb7..3c5c5d8e 100644
--- a/src/bin/daemon.rs
+++ b/src/bin/daemon.rs
@@ -19,10 +19,7 @@ fn parse_args(args: Vec<String>) -> Option<PathBuf> {
         return None;
     }
 
-    let is_help = args
-        .iter()
-        .any(|arg| arg.contains("help") || arg.contains("-h"));
-    if args.len() != 3 || is_help {
+    if args.len() != 3 {
         print_help_exit();
     }
 


Test patch:
diff --git a/tests/test_framework/lianad.py b/tests/test_framework/lianad.py
index 30fb4c94..eb273c31 100644
--- a/tests/test_framework/lianad.py
+++ b/tests/test_framework/lianad.py
@@ -127,6 +127,9 @@ class Lianad(TailableProc):
     def stop(self, timeout=5):
         try:
             self.rpc.stop()
+            self.wait_for_log(
+                "Stopping the liana daemon.",
+            )
             self.proc.wait(timeout)
         except Exception as e:
             logging.error(f"{self.prefix} : error when calling stop: '{e}'")
Repository: wizardsardine/liana
Pull request #666 (2023-08-31 14:44:27)

Release lianad 2.0rc1


Patch:
diff --git a/contrib/release/release.sh b/contrib/release/release.sh
index a8e3c9aa..52b7d845 100755
--- a/contrib/release/release.sh
+++ b/contrib/release/release.sh
@@ -7,7 +7,7 @@
 
 set -ex
 
-VERSION="${VERSION:-"1.0"}"
+VERSION="${VERSION:-"2.0rc1"}"
 LIANA_PREFIX="liana-$VERSION"
 LINUX_DIR_NAME="$LIANA_PREFIX-x86_64-linux-gnu"
 LINUX_ARCHIVE="$LINUX_DIR_NAME.tar.gz"
diff --git a/src/lib.rs b/src/lib.rs
index 37a68284..713e14fc 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -73,7 +73,7 @@ pub struct Version {
 
 impl fmt::Display for Version {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}.{}.{}-dev", self.major, self.minor, self.patch)
+        write!(f, "{}.{}.{}rc1", self.major, self.minor, self.patch)
     }
 }
 


Test patch:
diff --git a/tests/test_rpc.py b/tests/test_rpc.py
index 1d031743..9258cb6f 100644
--- a/tests/test_rpc.py
+++ b/tests/test_rpc.py
@@ -20,7 +20,7 @@ from test_framework.utils import (
 
 def test_getinfo(lianad):
     res = lianad.rpc.getinfo()
-    assert res["version"] == "2.0.0-dev"
+    assert res["version"] == "2.0.0rc1"
     assert res["network"] == "regtest"
     wait_for(lambda: lianad.rpc.getinfo()["block_height"] == 101)
     res = lianad.rpc.getinfo()
Repository: wizardsardine/liana
Pull request #775 (2023-11-01 17:08:19)

Release version 3.0 of lianad


Patch:
diff --git a/contrib/release/release.sh b/contrib/release/release.sh
index 24676d86..22286275 100755
--- a/contrib/release/release.sh
+++ b/contrib/release/release.sh
@@ -7,7 +7,7 @@
 
 set -ex
 
-VERSION="${VERSION:-"3.0rc1"}"
+VERSION="${VERSION:-"3.0"}"
 LIANA_PREFIX="liana-$VERSION"
 LINUX_DIR_NAME="$LIANA_PREFIX-x86_64-linux-gnu"
 LINUX_ARCHIVE="$LINUX_DIR_NAME.tar.gz"
diff --git a/src/lib.rs b/src/lib.rs
index 0a1bf7a6..bedb2c72 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -73,7 +73,7 @@ pub struct Version {
 
 impl fmt::Display for Version {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}.{}.{}rc1", self.major, self.minor, self.patch)
+        write!(f, "{}.{}.{}", self.major, self.minor, self.patch)
     }
 }
 


Test patch:
diff --git a/tests/test_rpc.py b/tests/test_rpc.py
index 460f5637..6fe121fa 100644
--- a/tests/test_rpc.py
+++ b/tests/test_rpc.py
@@ -21,7 +21,7 @@ from test_framework.utils import (
 
 def test_getinfo(lianad):
     res = lianad.rpc.getinfo()
-    assert res["version"] == "3.0.0rc1"
+    assert res["version"] == "3.0.0"
     assert res["network"] == "regtest"
     wait_for(lambda: lianad.rpc.getinfo()["block_height"] == 101)
     res = lianad.rpc.getinfo()
Repository: wizardsardine/liana
Pull request #818 (2023-11-16 17:13:09)

Add derivation_index to GetAddressResult
My bad, i pushed my fixes in a rush in #815 and wrecked the PR.


Patch:
diff --git a/src/commands/mod.rs b/src/commands/mod.rs
index 2d0c3014..8fbb363f 100644
--- a/src/commands/mod.rs
+++ b/src/commands/mod.rs
@@ -306,7 +306,7 @@ impl DaemonControl {
             .receive_descriptor()
             .derive(index, &self.secp)
             .address(self.config.bitcoin_config.network);
-        GetAddressResult::new(address)
+        GetAddressResult::new(address, index)
     }
 
     /// list addresses
@@ -945,22 +945,22 @@ pub struct GetInfoResult {
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct GetAddressResult {
     #[serde(deserialize_with = "deser_addr_assume_checked")]
-    address: bitcoin::Address,
-}
-
-#[derive(Debug, Clone, Serialize, Deserialize)]
-pub struct GetLabelsResult {
-    pub labels: HashMap<String, String>,
+    pub address: bitcoin::Address,
+    pub derivation_index: bip32::ChildNumber,
 }
 
 impl GetAddressResult {
-    pub fn new(address: bitcoin::Address) -> Self {
-        Self { address }
+    pub fn new(address: bitcoin::Address, derivation_index: bip32::ChildNumber) -> Self {
+        Self {
+            address,
+            derivation_index,
+        }
     }
+}
 
-    pub fn address(&self) -> &bitcoin::Address {
-        &self.address
-    }
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct GetLabelsResult {
+    pub labels: HashMap<String, String>,
 }
 
 #[derive(Debug, Clone, Serialize, PartialEq, Eq)]


Test patch:
diff --git a/tests/test_rpc.py b/tests/test_rpc.py
index e492da65..f1bed23b 100644
--- a/tests/test_rpc.py
+++ b/tests/test_rpc.py
@@ -35,6 +35,8 @@ def test_getaddress(lianad):
     assert "address" in res
     # We'll get a new one at every call
     assert res["address"] != lianad.rpc.getnewaddress()["address"]
+    # new address has derivation_index higher than the previous one
+    assert lianad.rpc.getnewaddress()["derivation_index"] == res["derivation_index"] + 2
 
 
 def test_listaddresses(lianad):