Class: Immudb::TxMetadata
- Inherits:
-
Object
- Object
- Immudb::TxMetadata
- Defined in:
- lib/immudb/tx_metadata.rb
Instance Attribute Summary collapse
-
#blRoot ⇒ Object
Returns the value of attribute blRoot.
-
#blTxID ⇒ Object
Returns the value of attribute blTxID.
-
#eh ⇒ Object
Returns the value of attribute eh.
-
#iD ⇒ Object
Returns the value of attribute iD.
-
#nEntries ⇒ Object
Returns the value of attribute nEntries.
-
#prevAlh ⇒ Object
Returns the value of attribute prevAlh.
-
#ts ⇒ Object
Returns the value of attribute ts.
Instance Method Summary collapse
Instance Attribute Details
#blRoot ⇒ Object
Returns the value of attribute blRoot.
15 16 17 |
# File 'lib/immudb/tx_metadata.rb', line 15 def blRoot @blRoot end |
#blTxID ⇒ Object
Returns the value of attribute blTxID.
15 16 17 |
# File 'lib/immudb/tx_metadata.rb', line 15 def blTxID @blTxID end |
#eh ⇒ Object
Returns the value of attribute eh.
15 16 17 |
# File 'lib/immudb/tx_metadata.rb', line 15 def eh @eh end |
#iD ⇒ Object
Returns the value of attribute iD.
15 16 17 |
# File 'lib/immudb/tx_metadata.rb', line 15 def iD @iD end |
#nEntries ⇒ Object
Returns the value of attribute nEntries.
15 16 17 |
# File 'lib/immudb/tx_metadata.rb', line 15 def nEntries @nEntries end |
#prevAlh ⇒ Object
Returns the value of attribute prevAlh.
15 16 17 |
# File 'lib/immudb/tx_metadata.rb', line 15 def prevAlh @prevAlh end |
#ts ⇒ Object
Returns the value of attribute ts.
15 16 17 |
# File 'lib/immudb/tx_metadata.rb', line 15 def ts @ts end |
Instance Method Details
#alh ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/immudb/tx_metadata.rb', line 17 def alh bi = [@iD].pack("Q>") + @prevAlh bj = [@ts.to_i, @nEntries.to_i].pack("Q>L>") bj = bj + @eh + [@blTxID].pack("Q>") + @blRoot inner_hash = Digest::SHA256.digest(bj) bi = bi + inner_hash Digest::SHA256.digest(bi) end |
#bytes ⇒ Object
26 27 28 |
# File 'lib/immudb/tx_metadata.rb', line 26 def bytes nil end |