bitcoin2graphdb 0.3.0 → 0.3.1
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/bitcoin2graphdb.gemspec +1 -1
- data/lib/bitcoin2graphdb/tasks/migration.rake +11 -0
- data/lib/bitcoin2graphdb/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d92ba9dc6248e68ac609afb938b1be277587d869
|
4
|
+
data.tar.gz: 7ca0e663bf652cdb4e86905cb91e7a87cf719d8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dae94d3ac46dec0d70d9f87bad72fa609849d3a0700b35b71aeebe5600b8dea8bb640c91c0bb83aff6bcb63afceb5dea126f1d01dcb9f907f98c16dc7f9e3331
|
7
|
+
data.tar.gz: 9f220916b617d592dfa800c8f40dbdfe3adbe1f3fa2ccf7a7204d732406b78d49ebf3ca5f73071b4c74d51ea2ca6f673646ad40eb08a7791414565b63f1af662
|
data/bitcoin2graphdb.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_runtime_dependency "openassets-ruby", ">= 0.
|
22
|
+
spec.add_runtime_dependency "openassets-ruby", ">= 0.5.0"
|
23
23
|
spec.add_runtime_dependency "daemon-spawn"
|
24
24
|
spec.add_runtime_dependency 'neo4j', '~> 5.0.0'
|
25
25
|
spec.add_runtime_dependency "activesupport", ">= 4.0.2"
|
@@ -29,6 +29,17 @@ namespace :b2g do
|
|
29
29
|
get_migration(args.config_path).import_tx(args.txid)
|
30
30
|
end
|
31
31
|
|
32
|
+
desc 'Remove down to block specified from the latest block'
|
33
|
+
task :remove_until_block, [:block_height,:config_path] do |task, args|
|
34
|
+
target_block_height = args.block_height.to_i
|
35
|
+
puts "remove_until_block down to #{target_block_height}"
|
36
|
+
migration = get_migration(args.config_path)
|
37
|
+
current_height = Graphdb::Model::Block.latest.first.height
|
38
|
+
current_height.downto(target_block_height) do |height|
|
39
|
+
migration.remove_block(height)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
32
43
|
private
|
33
44
|
def get_migration(config_path)
|
34
45
|
config = YAML.load(File.read(config_path)).deep_symbolize_keys[:bitcoin2graphdb]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitcoin2graphdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- azuchi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: openassets-ruby
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: daemon-spawn
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|