locktime

package
v0.0.0-...-bcfd2cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package locktime heuristic It checks for each output of a transaction, if the spending transactions locktime is the same of the original transaction. In this case, for the percentage, we just count each transaction that can be coupled with a transaction that has the same locktime (if its different from the default value).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locktime

type Locktime struct {
	Kv    kv.DB
	Cache *cache.Cache
}

Locktime heuristic

func (*Locktime) ChangeOutput

func (h *Locktime) ChangeOutput(transaction *tx.Tx) (c []uint32, err error)

ChangeOutput returns the index of the change output address based on locktime heuristic: Bitcoin Core sets the locktime to the current block height to prevent fee sniping. If all outputs have been spent, and there is only one output that has been spent in a transaction that matches this transaction's locktime behavior, it is the change.

func (*Locktime) Vulnerable

func (h *Locktime) Vulnerable(transaction *tx.Tx) bool

Vulnerable returns true if the transaction has a privacy vulnerability due to optimal change heuristic

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL