zold 0.23.4 → 0.23.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zold/commands/rebase.rb +3 -1
- data/lib/zold/hungry_wallets.rb +1 -1
- data/lib/zold/node/entrance.rb +1 -1
- data/lib/zold/version.rb +1 -1
- data/test/node/test_entrance.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: 8067a4751084cd631f09a99d4ce58f8cae3ee3d7186662bcaae2b871ad4922a5
|
4
|
+
data.tar.gz: d7ca7a6de3956c40b6f1c9a2c0b5512f44ab26737e02725a2b9895e9673b21e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a37b34395f2bd295a58ca9a87ed52a1a6b156e3ce5cba27431e597003a067ffc204d6409e955aa6a6590abb3ca66579820f1ebcef4879c712d8090e2465f994f
|
7
|
+
data.tar.gz: 89dee647bf855e393aa19d22790dd76b25903ff84b3513e6118708b3393e74f9e9958f6a704d39e22b4322586ca004bf54597e81826ca6d3b35d3bc7f795d453
|
data/lib/zold/commands/rebase.rb
CHANGED
@@ -54,9 +54,11 @@ Available options:"
|
|
54
54
|
end
|
55
55
|
mine = Args.new(opts, @log).take || return
|
56
56
|
list = mine.empty? ? @wallets.all : mine.map { |i| Id.new(i) }
|
57
|
+
modified = []
|
57
58
|
list.uniq.each do |id|
|
58
|
-
rebase(id, opts)
|
59
|
+
modified << id if rebase(id, opts)
|
59
60
|
end
|
61
|
+
modified
|
60
62
|
end
|
61
63
|
|
62
64
|
private
|
data/lib/zold/hungry_wallets.rb
CHANGED
@@ -58,7 +58,7 @@ module Zold
|
|
58
58
|
if @queue.size > 256
|
59
59
|
@log.error("Hungry queue is full with #{@queue.size} wallets, can't add #{id}")
|
60
60
|
elsif @missed.exists?(id)
|
61
|
-
@log.error("Hungry queue has seen #{id} just #{Age.new(@missed.mtime(id))} and it was not-found")
|
61
|
+
@log.error("Hungry queue has seen #{id} just #{Age.new(@missed.mtime(id))} ago and it was not-found")
|
62
62
|
else
|
63
63
|
@mutex.synchronize do
|
64
64
|
unless @queue.include?(id)
|
data/lib/zold/node/entrance.rb
CHANGED
@@ -83,11 +83,11 @@ module Zold
|
|
83
83
|
).run(['merge', id.to_s])
|
84
84
|
Clean.new(wallets: @wallets, copies: copies.root, log: @log).run(['clean', id.to_s])
|
85
85
|
copies.remove(localhost, Remotes::PORT)
|
86
|
+
modified += Rebase.new(wallets: @wallets, log: @log).run(['rebase', id.to_s])
|
86
87
|
if modified.empty?
|
87
88
|
@log.info("Accepted #{id} in #{Age.new(start, limit: 1)} and not modified anything")
|
88
89
|
else
|
89
90
|
@log.info("Accepted #{id} in #{Age.new(start, limit: 1)} and modified #{modified.join(', ')}")
|
90
|
-
Rebase.new(wallets: @wallets, log: @log).run(['rebase'] + modified.map(&:to_s))
|
91
91
|
end
|
92
92
|
sec = (Time.now - start).round(2)
|
93
93
|
@mutex.synchronize do
|
data/lib/zold/version.rb
CHANGED
data/test/node/test_entrance.rb
CHANGED
@@ -55,7 +55,7 @@ class TestEntrance < Zold::Test
|
|
55
55
|
target = home.create_wallet(tid)
|
56
56
|
e = Zold::Entrance.new(home.wallets, home.remotes, home.copies(source).root, 'x', log: test_log)
|
57
57
|
modified = e.push(source.id, body)
|
58
|
-
assert_equal(
|
58
|
+
assert_equal(3, modified.count)
|
59
59
|
assert_equal(Zold::Amount.new(zld: -19.99), source.balance)
|
60
60
|
assert_equal(Zold::Amount.new(zld: 19.99), target.balance)
|
61
61
|
assert(modified.include?(sid))
|
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.23.
|
4
|
+
version: 0.23.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
@@ -753,7 +753,7 @@ licenses:
|
|
753
753
|
- MIT
|
754
754
|
metadata: {}
|
755
755
|
post_install_message: |-
|
756
|
-
Thanks for installing Zold 0.23.
|
756
|
+
Thanks for installing Zold 0.23.5!
|
757
757
|
Study our White Paper: https://papers.zold.io/wp.pdf
|
758
758
|
Read our blog posts: https://blog.zold.io
|
759
759
|
Try ZLD online wallet at: https://wts.zold.io
|