lib/zold/node/nospam_entrance.rb
def push(id, body)
      before = @zache.get(id.to_s, lifetime: @period) { '' }
      after = hash(id, body)
      if before == after
        @log.debug("Spam of #{id} ignored; the wallet content of #{Size.new(body.length)} \
and '#{after[0..8]}' hash has already been seen #{Age.new(@zache.mtime(id.to_s))} ago")
        return []
      end
      @zache.put(id.to_s, after)
      @entrance.push(id, body)
    end
def push(id, body)
      before = @zache.get(id.to_s, lifetime: @period) { '' }
      after = hash(id, body)
      if before == after
        @log.debug("Spam of #{id} ignored; the wallet content of #{Size.new(body.length)} \
and '#{after[0..8]}' hash has already been seen #{Age.new(@zache.mtime(id.to_s))} ago")
        return []
      end
      @zache.put(id.to_s, after)
      @entrance.push(id, body)
    end
def push ( id , body ) before = @zache . get ( id . to_s , lifetime : @period ) { '' } after = hash ( id , body ) if before == after @log . debug ( "Spam of #{id} ignored; the wallet content of #{Size.new(body.length)} \
and '#{after[0..8]}' hash has already been seen #{Age.new(@zache.mtime(id.to_s))} ago" ) return [ ] end @zache . put ( id . to_s , after ) @entrance . push ( id , body ) end
Returns a list of modifed wallets (as Zold::Id)
Returns a list of modifed wallets ( as Zold :: Id )