bitcoin2graphdb 0.1.7 → 0.1.8

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
  SHA1:
3
- metadata.gz: 75f690fbe30d0ad157becf1dd15cc8a4b16e906e
4
- data.tar.gz: b1bc20f6a77c16e6639bbb888af0ddb1a307cc8c
3
+ metadata.gz: 7603f931b3929cfac792299a50ac45acae9aa77f
4
+ data.tar.gz: 38b6f89fe587f1e34a27380a0608034edac3f5be
5
5
  SHA512:
6
- metadata.gz: ca6097456ea0180ff55cc0f7519c0ef25ba99671b3ec54ebf924c43bda44e09fc7dc896677070d11143061eeb5551469a145b6c1be55783e677b82914c72c526
7
- data.tar.gz: ed380cd3af6f18a5315017802cad28274a147bb8f59f1743869222d3321f8e33eedc0b9d01a234a7cf39b3fa7ab9e946a66ae7b4635f03c03dc28dcecbdb4dde
6
+ metadata.gz: fecca69fb2f7d9d25b0f993d103658d0bf653d7bebce1a36575af2837937625b5126fd9d449494270450dc919d489263b1ba7c179470fddaac9cf89e98db3b1e
7
+ data.tar.gz: 9fe787d8b04d8e5015c6e1e9379089e3405a57eca40f9d4788354507eff0b44d2db288a0f237af0a75d8b9bb63030dbfaa9fab554aac6ef7ba56f1f3eb3db3a2
@@ -1,3 +1,3 @@
1
1
  module Bitcoin2Graphdb
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
@@ -3,6 +3,7 @@ module Graphdb
3
3
 
4
4
  class AssetId < ActiveNodeBase
5
5
  property :asset_id, index: :exact, constraint: :unique
6
+
6
7
  has_many :in, :outputs, origin: :asset_id, model_class: TxOut
7
8
 
8
9
  validates :asset_id, :presence => true
@@ -16,7 +16,11 @@ module Graphdb
16
16
  def create_from_txid(txid)
17
17
  tx = super(txid)
18
18
  outputs = Bitcoin2Graphdb::Bitcoin.provider.oa_outputs(txid)
19
- outputs.each{|o|tx.outputs[o['vout']].apply_oa_attributes(o)}
19
+ graph_outputs = tx.outputs.to_a
20
+ outputs.each{|o|
21
+ output = graph_outputs.find{|graph_out|graph_out.n == o['vout']}
22
+ output.apply_oa_attributes(o)
23
+ }
20
24
  tx.save!
21
25
  tx
22
26
  end
@@ -12,7 +12,7 @@ module Graphdb
12
12
  base.class_eval do
13
13
  property :asset_quantity, type: Integer
14
14
  property :oa_output_type
15
- has_one :out, :asset_id, type: :asset_id
15
+ has_one :out, :asset_id, type: :asset_id, model_class: AssetId
16
16
  end
17
17
  end
18
18
 
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.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - azuchi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-11 00:00:00.000000000 Z
11
+ date: 2016-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: openassets-ruby