Skip to content

Commit 4eb6192

Browse files
committed
sigh, more formatting
1 parent b95052d commit 4eb6192

File tree

6 files changed

+25
-33
lines changed

6 files changed

+25
-33
lines changed

lib/xrp/doc/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,3 @@ HUB_NETWORK_ID="testnet"
144144
```
145145

146146
b. lib/xrp/lib/assets/rippled/rippledconfig.py file. Here you can setup listners an network configuration for the network specified in part "a"
147-

lib/xrp/lib/assets/rippled/configBuilder.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class RippledConfig:
1313
"""Class to handle Rippled configuration settings"""
1414
assets_path: Path
1515
xrp_network: str
16-
16+
1717
def __init__(self, assets_path: str):
1818
self.assets_path = Path(assets_path) / "rippled"
1919
self.xrp_network = os.environ.get("XRP_NETWORK", "mainnet")
@@ -28,7 +28,7 @@ def load_config_files(self) -> Tuple[configparser.ConfigParser, configparser.Con
2828

2929
ripple_cfg.read_string(self._read_template_file("rippled.cfg.template"))
3030
validator_cfg.read_string(self._read_template_file("validators.txt.template"))
31-
31+
3232
return ripple_cfg, validator_cfg
3333

3434
def _read_template_file(self, filename: str) -> str:
@@ -50,11 +50,11 @@ def _create_config_parser() -> configparser.ConfigParser:
5050
parser.optionxform = str
5151
return parser
5252

53-
def apply_network_configuration(self, ripple_cfg: configparser.ConfigParser,
53+
def apply_network_configuration(self, ripple_cfg: configparser.ConfigParser,
5454
validator_cfg: configparser.ConfigParser) -> None:
5555
"""Apply network-specific configuration settings"""
5656
network_config = self.network_defaults[self.xrp_network]
57-
57+
5858
if self.xrp_network == "mainnet":
5959
self._configure_mainnet(ripple_cfg, validator_cfg, network_config)
6060
elif self.xrp_network == "testnet":
@@ -112,7 +112,7 @@ def main():
112112
try:
113113
assets_path = sys.argv[1]
114114
config_handler = RippledConfig(assets_path)
115-
115+
116116
ripple_cfg, validator_cfg = config_handler.load_config_files()
117117
config_handler.apply_network_configuration(ripple_cfg, validator_cfg)
118118

lib/xrp/lib/assets/rippled/rippled.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@
396396
# true - enables compression
397397
# false - disables compression [default].
398398
#
399-
# The rippled server can save bandwidth by compressing its peer-to-peer communications,
400-
# at a cost of greater CPU usage. If you enable link compression,
399+
# The rippled server can save bandwidth by compressing its peer-to-peer communications,
400+
# at a cost of greater CPU usage. If you enable link compression,
401401
# the server automatically compresses communications with peer servers
402402
# that also have link compression enabled.
403403
# https://xrpl.org/enable-link-compression.html
@@ -1008,7 +1008,7 @@
10081008
# that rippled is still in sync with the network,
10091009
# and that the validated ledger is less than
10101010
# 'age_threshold_seconds' old. If not, then continue
1011-
# sleeping for this number of seconds and
1011+
# sleeping for this number of seconds and
10121012
# checking until healthy.
10131013
# Default is 5.
10141014
#
@@ -1110,7 +1110,7 @@
11101110
# page_size Valid values: integer (MUST be power of 2 between 512 and 65536)
11111111
# The default is 4096 bytes. This setting determines
11121112
# the size of a page in the transaction.db file.
1113-
# See https://www.sqlite.org/pragma.html#pragma_page_size
1113+
# See https://www.sqlite.org/pragma.html#pragma_page_size
11141114
# for more details about the available options.
11151115
#
11161116
# journal_size_limit Valid values: integer

lib/xrp/lib/assets/user-data/check_xrp_sequence.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ get_metadata() {
8585
retry_count=$((retry_count + 1))
8686
sleep ${RETRY_DELAY}
8787
done
88-
88+
8989
log_error "Failed to retrieve metadata from ${endpoint} after ${MAX_RETRIES} attempts"
9090
return 1
9191
}
@@ -94,18 +94,18 @@ get_metadata() {
9494
check_dependencies() {
9595
log_info "Checking dependencies..."
9696
local missing_deps=()
97-
97+
9898
for cmd in aws jq curl; do
9999
if ! command -v "${cmd}" >/dev/null 2>&1; then
100100
missing_deps+=("${cmd}")
101101
fi
102102
done
103-
103+
104104
if [[ ${#missing_deps[@]} -gt 0 ]]; then
105105
log_error "Missing required dependencies: ${missing_deps[*]}"
106106
return 1
107107
fi
108-
108+
109109
log_info "All dependencies satisfied"
110110
return 0
111111
}
@@ -129,7 +129,7 @@ get_current_sequence() {
129129
retry_count=$((retry_count + 1))
130130
sleep ${RETRY_DELAY}
131131
done
132-
132+
133133
log_error "Failed to get current sequence after ${MAX_RETRIES} attempts"
134134
return 1
135135
}
@@ -138,7 +138,7 @@ get_current_sequence() {
138138
send_to_cloudwatch() {
139139
local sequence=$1
140140
local retry_count=0
141-
141+
142142
while [[ ${retry_count} -lt ${MAX_RETRIES} ]]; do
143143
if aws cloudwatch put-metric-data \
144144
--namespace "${NAMESPACE}" \
@@ -154,7 +154,7 @@ send_to_cloudwatch() {
154154
retry_count=$((retry_count + 1))
155155
sleep ${RETRY_DELAY}
156156
done
157-
157+
158158
log_error "Failed to send metrics to CloudWatch after ${MAX_RETRIES} attempts"
159159
return 1
160160
}
@@ -171,38 +171,38 @@ init_environment() {
171171
# Main function
172172
main() {
173173
local sequence
174-
174+
175175
log_info "Starting XRP sequence check"
176-
176+
177177
# Ensure only one instance is running
178178
exec {LOCK_FD}>"${LOCKFILE}"
179179
if ! flock -n "${LOCK_FD}"; then
180180
log_error "Another instance is already running"
181181
return 1
182182
fi
183-
183+
184184
# Check dependencies first
185185
if ! check_dependencies; then
186186
return 1
187187
fi
188-
188+
189189
# Initialize environment variables
190190
if ! init_environment; then
191191
return 1
192192
fi
193-
193+
194194
# Get current sequence
195195
if ! sequence=$(get_current_sequence); then
196196
return 1
197197
fi
198-
198+
199199
log_info "Retrieved sequence: ${sequence}"
200-
200+
201201
# Send to CloudWatch
202202
if ! send_to_cloudwatch "${sequence}"; then
203203
return 1
204204
fi
205-
205+
206206
log_info "XRP sequence check completed successfully"
207207
return 0
208208
}

lib/xrp/lib/assets/user-data/node.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ install_rippled() {
120120
log_info "rippled package already installed, checking for updates..."
121121
sudo yum update -y rippled
122122
fi
123-
123+
124124
log_info "build out and write rippled.cfg and validaotrs.txt"
125125
python3 ${ASSETS_DIR}/rippled/configBuilder.py ${ASSETS_DIR}
126126

lib/xrp/lib/config/createIniFile.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,3 @@ export function parseRippledConfig(filePath: string): RippledConfig {
3232
});
3333
return config;
3434
}
35-
36-
37-
38-
39-
40-
41-

0 commit comments

Comments
 (0)