zold 0.26.18 → 0.26.19

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89109464b2af91b04867b407d157ad720d3f427f448c219d35fb582a50b11d26
4
- data.tar.gz: 8b5ec196c38cb866499d6b8668f78103d2d420195269a6420d8ef1fa91677d69
3
+ metadata.gz: 6fa341a547ba1c83699a076f78886ea6cd3f28c2dca5b46675e214f4ee155fc3
4
+ data.tar.gz: 4570c47941b0522ceebb915620c016c7aa239984d1510f2219631a35d76a655b
5
5
  SHA512:
6
- metadata.gz: 9af8dd404a6cde1f6bba43b3de2df8ad9716c4b7fba0d06adbf020a89f032a624686b6aacaf899bfbf740ed163da8ff1fb17193167e834ea2643ee9377398c3a
7
- data.tar.gz: 2cd5d57d28b64bd71bcfd8fc81e8201a5a749d2b8b50f2c1af45a99f62b2d52f0236a16fdf38ed7dde06443fa42501eee004e93fc921e1ba6bbad3c1ceef314d
6
+ metadata.gz: d818d6a9e3bbcc5ad446de965d70ffe72ecd9f78d9c04e49fe0d547a2be9c148cff3e5c9381ba37888bc6562e43e95b7c928b997622ace8a1dbaad9876438715
7
+ data.tar.gz: 792d5b93d848ee5d8685a9f4242c99b5753abb21c5071684a98069ca5570adf61470ef9117fdb3a37f7df335b9d2ee9222821430043ac2490cd1733bbe262b56
@@ -74,6 +74,9 @@ Available options:"
74
74
  o.string '--ledger',
75
75
  'The name of the file where all new negative transactions will be recorded (default: /dev/null)',
76
76
  default: '/dev/null'
77
+ o.array '--trusted',
78
+ 'List of wallet IDs we fully trust and won\'t pull',
79
+ default: []
77
80
  o.string '--network',
78
81
  'The name of the network we work in',
79
82
  default: 'test'
@@ -151,10 +154,13 @@ into #{@wallets.acq(id, &:mnemo)} in #{Age.new(start, limit: 0.1 + cps.count * 0
151
154
  end
152
155
  else
153
156
  patch.join(wallet, ledger: opts['ledger']) do |txn|
154
- Pull.new(wallets: @wallets, remotes: @remotes, copies: @copies, log: @log).run(
155
- ['pull', txn.bnf.to_s, "--network=#{opts['network']}", '--quiet-if-absent'] +
156
- (opts['deep'] ? ['--deep'] : ['--shallow'])
157
- )
157
+ unless opts['trusted'].include?(txn.bnf.to_s) || opts['trusted'].count > 32
158
+ Pull.new(wallets: @wallets, remotes: @remotes, copies: @copies, log: @log).run(
159
+ ['pull', txn.bnf.to_s, "--network=#{opts['network']}", '--quiet-if-absent'] +
160
+ (opts['deep'] ? ['--deep'] : ['--shallow']) +
161
+ ['--trusted=' + (opts['trusted'] + [txn.bnf.to_s]).join(',')]
162
+ )
163
+ end
158
164
  true
159
165
  end
160
166
  end
@@ -479,7 +479,9 @@ this is not a normal behavior, you may want to report a bug to our GitHub reposi
479
479
 
480
480
  get '/journal/item' do
481
481
  content_type('text/plain')
482
- IO.read(File.join(settings.journal_dir, params[:id]))
482
+ file = File.join(settings.journal_dir, params[:id])
483
+ error(404, "Journal item not found at #{file}") unless File.exist?(file)
484
+ IO.read(file)
483
485
  end
484
486
 
485
487
  not_found do
@@ -84,6 +84,8 @@ module Zold
84
84
  jlog.level = Logger::DEBUG
85
85
  jlog.formatter = Log::COMPACT
86
86
  jlog.info("push(#{id}, #{body.length} bytes): starting...")
87
+ jlog.info("Time: #{Time.now.utc.iso8601}")
88
+ jlog.info("Zold gem version: #{Zold::VERSION}")
87
89
  modified = @pipeline.push(id, body, JournaledPipeline::Wallets.new(wallets, jlog), Log::Tee.new(log, jlog))
88
90
  jlog.info("push(#{id}): done")
89
91
  modified
data/lib/zold/version.rb CHANGED
@@ -25,7 +25,7 @@
25
25
  # Copyright:: Copyright (c) 2018 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Zold
28
- VERSION = '0.26.18'
28
+ VERSION = '0.26.19'
29
29
  PROTOCOL = 2
30
30
  REPO = 'zold-io/zold'
31
31
  end
@@ -80,7 +80,7 @@ class FakeNode
80
80
  ensure
81
81
  Zold::Http.new(uri: uri + '?halt=test').get
82
82
  node.join
83
- sleep 0.01 # stupid sleep to make sure all threads are terminated
83
+ sleep 0.1 # stupid sleep to make sure all threads are terminated
84
84
  end
85
85
  end
86
86
  end
data/views/journal.haml CHANGED
@@ -3,6 +3,10 @@
3
3
  Showing only wallet
4
4
  %code= id
5
5
 
6
+ %p
7
+ = files.count
8
+ PUSH operation(s) over the last 24 hours:
9
+
6
10
  %table
7
11
  %thead
8
12
  %tr
@@ -14,6 +18,7 @@
14
18
  - file = File.join(dir, f)
15
19
  %tr
16
20
  %td
17
- %a{href: '/journal/item?id=#{f}'}= f
21
+ %a{href: "/journal/item?id=#{f}"}<
22
+ %code= f
18
23
  %td.right= Zold::Size.new(File.size(file))
19
24
  %td= "#{Zold::Age.new(File.mtime(file))} ago"
data/views/layout.haml CHANGED
@@ -21,12 +21,34 @@
21
21
  %meta{name: 'twitter:image:alt', content: 'Zold'}
22
22
  %body
23
23
  %section
24
- %p
25
- %a{href: '/'}
26
- %img.logo{src: '//www.zold.io/images/logo.svg', alt: 'Zold logo'}
24
+ %header
25
+ %nav
26
+ %li
27
+ %a{href: '/'}
28
+ %img.logo{src: '//www.zold.io/images/logo.svg', alt: 'Zold logo'}
29
+ %nav
30
+ %li
31
+ %a{href: '/'} Home
32
+ %li
33
+ %a{href: '/queue'} Queue
34
+ %li
35
+ %a{href: '/remotes'} Remotes
36
+ %li
37
+ %a{href: '/threads'} Threads
38
+ %li
39
+ %a{href: '/wallets'} Wallets
40
+ %li
41
+ %a{href: '/ledger'} Ledger
42
+ %li
43
+ %a{href: '/journal'} Journal
44
+ %li
45
+ %a{href: '/farm'} Farm
46
+ %li
47
+ %a{href: '/metronome'} Metronome
27
48
  = yield
28
- %p.footnotes
29
- = Zold::VERSION
30
- %p
31
- %a{href: 'https://github.com/zold-io/zold/stargazers'}
32
- %img{src: '//img.shields.io/github/stars/zold-io/zold.svg?style=flat-square', alt: 'GitHub stars'}
49
+ %footer
50
+ %p.footnotes
51
+ = Zold::VERSION
52
+ %p
53
+ %a{href: 'https://github.com/zold-io/zold/stargazers'}
54
+ %img{src: '//img.shields.io/github/stars/zold-io/zold.svg?style=flat-square', alt: 'GitHub stars'}
data/views/wallet.haml CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  %table
11
11
  %thead
12
- %th
12
+ %tr
13
13
  %th Id
14
14
  %th Date
15
15
  %th Amount
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.26.18
4
+ version: 0.26.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
@@ -798,7 +798,7 @@ licenses:
798
798
  - MIT
799
799
  metadata: {}
800
800
  post_install_message: |-
801
- Thanks for installing Zold 0.26.18!
801
+ Thanks for installing Zold 0.26.19!
802
802
  Study our White Paper: https://papers.zold.io/wp.pdf
803
803
  Read our blog posts: https://blog.zold.io
804
804
  Try ZLD online wallet at: https://wts.zold.io