Spec mute/unmute user (P4.1/P4.2)

Add client, DB, and indexer Gherkin specs for the Memo mute (0x6d16) and
unmute (0x6d17) actions.

By specifier.
This commit is contained in:
Chris Troutner
2026-08-28 19:07:07 -07:00
parent befae539c7
commit fa90179869
3 changed files with 121 additions and 0 deletions
@@ -0,0 +1,36 @@
# Scenarios: Mute Indexer - 1, Mute Indexer - 2, Mute Indexer - 3
#
# The indexer parses Memo mute actions and stores structured records:
# - 0x6d16 mute: target address (20-byte hash160)
# - 0x6d17 unmute: target address (20-byte hash160)
# The target is a 20-byte P2PKH hash160, like the follow/unfollow payload.
Feature: Mute Indexer
Background:
Given a psf-memo-db instance that records mute records
Given a psf-memo-indexer configured to write to that database
Scenario Outline: Mute Indexer - 1 a mute transaction stores the mute record
When the indexer processes a mute transaction for the address <addr> from <muter>
Then the psf-memo-db stores a mute record for the address <addr> by <muter>
Examples:
| addr | muter |
| bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | bitcoincash:qqlrzp23w08434twmvr4fxw672whkjy0py26r63g3d |
| bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r | bitcoincash:qqlrzp23w08434twmvr4fxw672whkjy0py26r63g3d |
Scenario Outline: Mute Indexer - 2 an unmute transaction stores the unmute record
When the indexer processes an unmute transaction for the address <addr> from <muter>
Then the psf-memo-db stores an unmute record for the address <addr> by <muter>
Examples:
| addr | muter |
| bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | bitcoincash:qqlrzp23w08434twmvr4fxw672whkjy0py26r63g3d |
Scenario Outline: Mute Indexer - 3 a mute transaction with a wrong-size address is rejected
When the indexer processes a mute transaction for the address <addr> from <muter>
Then the indexer records a process error and stores no mute record
Examples:
| addr | muter |
| | bitcoincash:qqlrzp23w08434twmvr4fxw672whkjy0py26r63g3d |