zold 0.14.6 → 0.14.7
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/.simplecov +1 -1
- data/lib/zold/node/safe_entrance.rb +2 -2
- data/lib/zold/node/spread_entrance.rb +3 -1
- data/lib/zold/version.rb +1 -1
- data/test/node/test_spread_entrance.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe5dfb0c10d55bd3baccfdeb9fcdf48fa2c71b5f
|
4
|
+
data.tar.gz: 72eb0acf988ec8e6e58eb7e9f341c286ab7c5732
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0c43f1bbf63ac32f535b2d3f5b5bb84b851395ef9445ea311fa2eda9467f4aae101862ab326fd90f1bac7e7fcd90eafa23f324502efeffa12647a7ebe49d19c
|
7
|
+
data.tar.gz: 44fac93b3e27a4f3687d06fe4b2e6097503abbda9d280a392fd47c1b38a46d43a64ed505eab526ebb60cf36ddd1ae0333a7d1ef0c9666cc04bb3c697437e523a
|
data/.simplecov
CHANGED
@@ -61,10 +61,10 @@ module Zold
|
|
61
61
|
wallet = Wallet.new(f.path)
|
62
62
|
wallet.refurbish
|
63
63
|
unless wallet.protocol == Zold::PROTOCOL
|
64
|
-
raise "
|
64
|
+
raise "Protocol mismatch, #{wallet.id} is in '#{wallet.protocol}', we are in '#{Zold::PROTOCOL}'"
|
65
65
|
end
|
66
66
|
unless wallet.network == @network
|
67
|
-
raise "
|
67
|
+
raise "Network name mismatch, #{wallet.id} is in '#{wallet.network}', we are in '#{@network}'"
|
68
68
|
end
|
69
69
|
balance = wallet.balance
|
70
70
|
if balance.negative? && !wallet.root?
|
@@ -94,12 +94,14 @@ module Zold
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def push(id, body)
|
97
|
-
@entrance.push(id, body)
|
97
|
+
mods = @entrance.push(id, body)
|
98
|
+
(mods + [id]).each do |m|
|
98
99
|
next if @seen.include?(m)
|
99
100
|
@seen << m
|
100
101
|
@modified.push(m)
|
101
102
|
@log.debug("Push scheduled for #{m}, queue size is #{@modified.size}")
|
102
103
|
end
|
104
|
+
mods
|
103
105
|
end
|
104
106
|
end
|
105
107
|
end
|
data/lib/zold/version.rb
CHANGED
@@ -52,7 +52,7 @@ class TestSpreadEntrance < Minitest::Test
|
|
52
52
|
remotes.add('localhost', port)
|
53
53
|
Zold::SpreadEntrance.new(FakeEntrance.new, home.wallets, remotes, 'x', log: test_log).start do |e|
|
54
54
|
8.times { e.push(wallet.id, File.read(wallet.path)) }
|
55
|
-
assert(e.to_json[:modified] < 2)
|
55
|
+
assert(e.to_json[:modified] < 2, "It's too big: #{e.to_json[:modified]}")
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|