@agoric/cosmos 0.34.2-dev-160f38d.0 → 0.34.2-dev-e7af58f.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/git-revision.txt +1 -1
- package/package.json +2 -2
- package/x/swingset/types/msgs.go +4 -0
package/git-revision.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
e7af58f
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/cosmos",
|
|
3
|
-
"version": "0.34.2-dev-
|
|
3
|
+
"version": "0.34.2-dev-e7af58f.0+e7af58f",
|
|
4
4
|
"description": "Connect JS to the Cosmos blockchain SDK",
|
|
5
5
|
"parsers": {
|
|
6
6
|
"js": "mjs"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"typeCoverage": {
|
|
40
40
|
"atLeast": 0
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "e7af58fe25a802d23283633416d0900aa06a2127"
|
|
43
43
|
}
|
package/x/swingset/types/msgs.go
CHANGED
|
@@ -67,11 +67,15 @@ func chargeAdmission(
|
|
|
67
67
|
msgs []string,
|
|
68
68
|
storageLen uint64,
|
|
69
69
|
) error {
|
|
70
|
+
// A flat charge for each transaction.
|
|
70
71
|
beans := beansPerUnit[BeansPerInboundTx]
|
|
72
|
+
// A charge for each message in the transaction.
|
|
71
73
|
beans = beans.Add(beansPerUnit[BeansPerMessage].MulUint64((uint64(len(msgs)))))
|
|
74
|
+
// A charge for the total byte length of all messages.
|
|
72
75
|
for _, msg := range msgs {
|
|
73
76
|
beans = beans.Add(beansPerUnit[BeansPerMessageByte].MulUint64(uint64(len(msg))))
|
|
74
77
|
}
|
|
78
|
+
// A charge for persistent storage.
|
|
75
79
|
beans = beans.Add(beansPerUnit[BeansPerStorageByte].MulUint64(storageLen))
|
|
76
80
|
|
|
77
81
|
return keeper.ChargeBeans(ctx, beansPerUnit, addr, beans)
|