Module: Ethereum::CachedBlock

Defined in:
lib/ethereum/cached_block.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create_cached(blk) ⇒ Object



4
5
6
7
# File 'lib/ethereum/cached_block.rb', line 4

def self.create_cached(blk)
  blk.singleton_class.send :include, self
  blk
end

Instance Method Details

#commit_stateObject



17
18
19
# File 'lib/ethereum/cached_block.rb', line 17

def commit_state
  # do nothing
end

#full_hashObject



25
26
27
# File 'lib/ethereum/cached_block.rb', line 25

def full_hash
  @full_hash ||= super
end

#hashObject



21
22
23
# File 'lib/ethereum/cached_block.rb', line 21

def hash
  Utils.big_endian_to_int full_hash
end

#revert(*args) ⇒ Object

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/ethereum/cached_block.rb', line 13

def revert(*args)
  raise NotImplementedError
end

#state_root=(*args) ⇒ Object

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/ethereum/cached_block.rb', line 9

def state_root=(*args)
  raise NotImplementedError
end