Add share cards
This commit is contained in:
51 files changed
+1193
-239
No files matched your search
@@ -126,7 +126,7 @@ func (s *BlockStore) Close() error {
|
||||
return s.db.Close()
|
||||
}
|
||||
|
||||
// InsertBlock is idempotent — duplicate heights are ignored so replayed
|
||||
// InsertBlock is idempotent, duplicate heights are ignored so replayed
|
||||
// log events after a restart don't trip the primary key constraint.
|
||||
// Returns (true, nil) if a new row was actually inserted, (false, nil)
|
||||
// if the height was already present (replay or duplicate).
|
||||
@@ -247,7 +247,7 @@ func (s *BlockStore) Recent(limit int) ([]Block, error) {
|
||||
|
||||
// BlocksNeedingEnrichment returns blocks whose hash or reward is still
|
||||
// unset and that were found within the lookback window. Older entries
|
||||
// are ignored — if bitcoind couldn't tell us about a day-old block,
|
||||
// are ignored, if bitcoind couldn't tell us about a day-old block,
|
||||
// retrying will keep failing.
|
||||
func (s *BlockStore) BlocksNeedingEnrichment(since time.Time) ([]Block, error) {
|
||||
rows, err := s.db.Query(
|
||||
@@ -300,7 +300,7 @@ func (s *BlockStore) MarkOrphaned(height int64, at time.Time) error {
|
||||
|
||||
// UnmarkOrphaned clears the orphaned_at stamp set by MarkOrphaned.
|
||||
// Used to correct false positives caused by a network switch: a block
|
||||
// found on testnet is not "orphaned" when the node switches to mainnet —
|
||||
// found on testnet is not "orphaned" when the node switches to mainnet,
|
||||
// it simply belongs to a different chain and must not be compared against
|
||||
// mainnet's canonical history.
|
||||
func (s *BlockStore) UnmarkOrphaned(height int64) error {
|
||||
@@ -326,7 +326,7 @@ func (s *BlockStore) UnmarkOrphanedStampChain(height int64, chain string) error
|
||||
|
||||
// StampChain sets the chain field on a block without touching orphaned_at.
|
||||
// Used when the reconcile loop determines a block belongs to a different
|
||||
// network — the block is not orphaned (a reorg), it just doesn't belong
|
||||
// network, the block is not orphaned (a reorg), it just doesn't belong
|
||||
// to the current chain.
|
||||
func (s *BlockStore) StampChain(height int64, chain string) error {
|
||||
_, err := s.db.Exec(
|
||||
|
||||
Reference in new issue
Block a user