Skip to content

Commit bd18f99

Browse files
committed
plugin: Added message type 28 as sticky type
1 parent b8e89a7 commit bd18f99

File tree

4 files changed

+78
-6
lines changed

4 files changed

+78
-6
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,17 @@ present at a time, freeing others from that duty.
4444

4545
The easiest way to begin using __Greenlight__ is with its command-line
4646
interface `glcli`. You can install it directly from __crates.io__ by running:
47+
4748
```bash
4849
cargo install gl-cli
4950
```
5051

5152
Once installed execute:
53+
5254
```bash
5355
glcli --help
5456
```
57+
5558
This command will display an overview of all available commands.
5659

5760
For additional details and usage examples, refer to `glcli` [README][glcli-doc].

libs/gl-plugin/.kacl.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
kacl:
2+
file: CHANGELOG.md
3+
allowed_header_titles:
4+
- Changelog
5+
- Change Log
6+
allowed_version_sections:
7+
- Added
8+
- Changed
9+
- Deprecated
10+
- Removed
11+
- Fixed
12+
- Security
13+
default_content:
14+
- All notable changes to this project will be documented in this file.
15+
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
16+
release:
17+
add_unreleased: True
18+
git:
19+
commit: False
20+
commit_message: "[skip ci] Releasing Changelog version {new_version}"
21+
commit_additional_files: []
22+
tag: False
23+
tag_name: "v{new_version}"
24+
tag_description: "Version v{new_version} released"
25+
links:
26+
auto_generate: False
27+
compare_versions_template: '{host}/compare/{previous_version}...{version}'
28+
unreleased_changes_template: '{host}/compare/{latest_version}...master'
29+
initial_version_template: '{host}/tree/{version}'
30+
extension:
31+
post_release_version_prefix: null
32+
issue_tracker:
33+
jira:
34+
host: null
35+
username: null
36+
password: null
37+
issue_patterns: ["[A-Z]+-[0-9]+"]
38+
comment_template: |
39+
# 🚀 New version [v{new_version}]({link})
40+
41+
A new release has been created referencing this issue. Please check it out.
42+
43+
## 🚧 Changes in this version
44+
45+
{changes}
46+
47+
## 🧭 Reference
48+
49+
Code: [Source Code Management System]({link})
50+
stash:
51+
directory: .kacl_stash
52+
always: False

libs/gl-plugin/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## Unreleased
8+
9+
### Changed
10+
11+
- Added message type 28 (`hsmd_check_pubkey`) to the list of sticky signer request.

libs/gl-plugin/src/stager.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,22 @@ impl Stage {
9898
}
9999

100100
pub async fn is_stuck(&self) -> bool {
101-
let sticky = self
101+
let sticky_types: Vec<u16> = vec![5, 28];
102+
let sticky: Vec<Request> = self
102103
.requests
103104
.lock()
104105
.await
105106
.values()
106-
.filter(|r| r.request.raw[0..2] == [0u8, 5])
107-
.count();
108-
109-
trace!("Found {sticky} sticky requests.");
110-
sticky != 0
107+
.filter(|r| {
108+
let head: [u16; 2] = [r.request.raw[0].into(), r.request.raw[1].into()];
109+
let typ = head[0] << 8 | head[1];
110+
sticky_types.contains(&typ)
111+
})
112+
.map(|r| r.clone())
113+
.collect();
114+
115+
trace!("Found {:?} sticky requests.", sticky);
116+
sticky.len() != 0
111117
}
112118
}
113119

0 commit comments

Comments
 (0)