zold 0.24.4 → 0.24.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/zold/node/async_entrance.rb +1 -5
- data/lib/zold/node/front.rb +17 -8
- data/lib/zold/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e9d260c67c93b22986b2c4c7f34b905b68864cb98e6fa2b41fed7322fa8c08d
|
4
|
+
data.tar.gz: 1c181196b0b7aa26f316a97ea782cd1c2a1dc8567c915f170277b5ceeabad81e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4341afb37bf3dbc709742f0371dc734cdc18e0e98ac621e9514f146474450e4ba23c37444b88e0c8b616c9b9f94c078ad350e3cf01a70131c43491f287c3b0d
|
7
|
+
data.tar.gz: 6f3b4684dbd283761ea0053fa5d1b73eb58e2941af7386a9bdfd63de5ccd283d2b781f8e6e98df27d002f2c963852794c167772bababe918d1763cead117f84a
|
@@ -64,11 +64,7 @@ module Zold
|
|
64
64
|
file = File.join(@dir, f)
|
65
65
|
if /^[0-9a-f]{16}-/.match?(f)
|
66
66
|
id = f.split('-')[0]
|
67
|
-
|
68
|
-
@queue << { id: Id.new(id), file: file }
|
69
|
-
else
|
70
|
-
File.delete(file)
|
71
|
-
end
|
67
|
+
@queue << { id: Id.new(id), file: file }
|
72
68
|
else
|
73
69
|
File.delete(file)
|
74
70
|
end
|
data/lib/zold/node/front.rb
CHANGED
@@ -118,14 +118,7 @@ while #{settings.address} is in '#{settings.opts['network']}'")
|
|
118
118
|
if settings.address == "#{s.host}:#{s.port}" && !settings.opts['ignore-score-weakness']
|
119
119
|
error(400, 'Self-requests are prohibited')
|
120
120
|
end
|
121
|
-
|
122
|
-
begin
|
123
|
-
Remote.new(remotes: settings.remotes, log: settings.log).run(
|
124
|
-
['remote', 'add', s.host, s.port.to_s, "--network=#{settings.opts['network']}", '--ignore-if-exists']
|
125
|
-
)
|
126
|
-
rescue StandardError => e
|
127
|
-
error(400, e.message)
|
128
|
-
end
|
121
|
+
add_new_remote(s)
|
129
122
|
end
|
130
123
|
end
|
131
124
|
end
|
@@ -544,5 +537,21 @@ time to stop; use --skip-oom to never quit")
|
|
544
537
|
yield wallet
|
545
538
|
end
|
546
539
|
end
|
540
|
+
|
541
|
+
def add_new_remote(score)
|
542
|
+
all = settings.remotes.all
|
543
|
+
return if all.count > Remotes::MAX_NODES && all.none? { |r| r[:error] > Remotes::TOLERANCE }
|
544
|
+
begin
|
545
|
+
require_relative '../commands/remote'
|
546
|
+
Remote.new(remotes: settings.remotes, log: settings.log).run(
|
547
|
+
[
|
548
|
+
'remote', 'add', score.host, score.port.to_s,
|
549
|
+
"--network=#{settings.opts['network']}", '--ignore-if-exists'
|
550
|
+
]
|
551
|
+
)
|
552
|
+
rescue StandardError => e
|
553
|
+
error(400, e.message)
|
554
|
+
end
|
555
|
+
end
|
547
556
|
end
|
548
557
|
end
|
data/lib/zold/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.24.
|
4
|
+
version: 0.24.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
@@ -764,7 +764,7 @@ licenses:
|
|
764
764
|
- MIT
|
765
765
|
metadata: {}
|
766
766
|
post_install_message: |-
|
767
|
-
Thanks for installing Zold 0.24.
|
767
|
+
Thanks for installing Zold 0.24.5!
|
768
768
|
Study our White Paper: https://papers.zold.io/wp.pdf
|
769
769
|
Read our blog posts: https://blog.zold.io
|
770
770
|
Try ZLD online wallet at: https://wts.zold.io
|