Files
m2pool_payment/流程.txt
2025-11-18 11:10:16 +08:00

22 lines
1.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

充值rmq -> listen -> 写数据库
-> 添加到TopupMsgs
-> 传给对应的node server -> node server接收 -> 添加到钱包
-> 记录到钱包数据库
提现/支付rmq -> listen -> 写数据库
-> 添加到WithdrawMsgs
-> 传给对应的node server -> node server接收 -> 记录到数据库
-> 开始转账 -> 校验余额 -> 转账 -> 转账结果返回 -> listen -> 修改相关状态
node server listen -> 新区块产生时读取当前listen server的消息 -> 对比消息和区块中的交易 -> 消息中的to = 区块交易中的to(充值) -> 返回消息 -> listen -> 修改数据库
-> 记录到unconfirmtxs -> 返回rmq -> 发送消息
-> 消息中的from、to、amount = 区块交易中的from、to、amount(提现/充值) -> 返回消息 -> listen -> 修改数据库状态
node server confirm -> 新区块产生同时会读取当前unconfirmtxs数据 -> 对比每个交易的高度 -> 符合确认条件 -> 修改钱包数据
-> 返回消息 -> listen -> 修改相关数据 -> 返回rmq -> 发出消息
确认后的状态修改余额增减、hash录入等