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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 238ff4b33fb512cbd78ba812dd4ccf9fa5b6aa956919233d3ee7b5445e813726
4
- data.tar.gz: 98f610ea0b6dbd7bade4bc24684e1b8ddaf267394f246eb31c0fc4c6f0c493cf
3
+ metadata.gz: 8067a4751084cd631f09a99d4ce58f8cae3ee3d7186662bcaae2b871ad4922a5
4
+ data.tar.gz: d7ca7a6de3956c40b6f1c9a2c0b5512f44ab26737e02725a2b9895e9673b21e1
5
5
  SHA512:
6
- metadata.gz: 5814292371095a7c0417d9328708b5412bfb4486d87ba9d8eb4ed7bc13ddff099e5270d37ae94f3ba9b20e7feacac7412538cddbb65c813385ec5f3ba37b9024
7
- data.tar.gz: f599d92a904277de6026c4233da9b4deca492cb2d38df0e68846a781b41e0d50e86a37c8af067b8da59dd73711deafbed61b1eed17f1198ad3637a13eb294223
6
+ metadata.gz: a37b34395f2bd295a58ca9a87ed52a1a6b156e3ce5cba27431e597003a067ffc204d6409e955aa6a6590abb3ca66579820f1ebcef4879c712d8090e2465f994f
7
+ data.tar.gz: 89dee647bf855e393aa19d22790dd76b25903ff84b3513e6118708b3393e74f9e9958f6a704d39e22b4322586ca004bf54597e81826ca6d3b35d3bc7f795d453
@@ -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
@@ -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)
@@ -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
@@ -25,7 +25,7 @@
25
25
  # Copyright:: Copyright (c) 2018 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Zold
28
- VERSION = '0.23.4'
28
+ VERSION = '0.23.5'
29
29
  PROTOCOL = 2
30
30
  REPO = 'zold-io/zold'
31
31
  end
@@ -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(2, modified.count)
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
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.4!
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