lib/zold/node/entrance.rb
def push(id, body)
      raise 'Id can\'t be nil' if id.nil?
      raise 'Id must be of type Id' unless id.is_a?(Id)
      raise 'Body can\'t be nil' if body.nil?
      start = Time.now
      modified = @pipeline.push(id, body, @wallets, @log)
      sec = (Time.now - start).round(2)
      @mutex.synchronize do
        @history.shift if @history.length >= 16
        @speed.shift if @speed.length >= 64
        @wallets.acq(id) do |wallet|
          @history << "#{sec}/#{modified.count}/#{wallet.mnemo}"
        end
        @speed << sec
      end
      modified
    end
def push(id, body)
      raise 'Id can\'t be nil' if id.nil?
      raise 'Id must be of type Id' unless id.is_a?(Id)
      raise 'Body can\'t be nil' if body.nil?
      start = Time.now
      modified = @pipeline.push(id, body, @wallets, @log)
      sec = (Time.now - start).round(2)
      @mutex.synchronize do
        @history.shift if @history.length >= 16
        @speed.shift if @speed.length >= 64
        @wallets.acq(id) do |wallet|
          @history << "#{sec}/#{modified.count}/#{wallet.mnemo}"
        end
        @speed << sec
      end
      modified
    end
def push ( id , body ) raise 'Id can\'t be nil' if id . nil? raise 'Id must be of type Id' unless id . is_a? ( Id ) raise 'Body can\'t be nil' if body . nil? start = Time . now modified = @pipeline . push ( id , body , @wallets , @log ) sec = ( Time . now - start ) . round ( 2 ) @mutex . synchronize do @history . shift if @history . length >= 16 @speed . shift if @speed . length >= 64 @wallets . acq ( id ) do | wallet | @history << "#{sec}/#{modified.count}/#{wallet.mnemo}" end @speed << sec end modified end
Returns a list of modifed wallets (as Zold::Id)
Returns a list of modifed wallets ( as Zold :: Id )